@tailor-platform/erp-kit 0.2.1 → 0.2.2

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 (618) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -23
  3. package/dist/cli.mjs +1613 -0
  4. package/package.json +14 -13
  5. package/schemas/app-compose/story.yml +12 -0
  6. package/schemas/module/command.yml +9 -0
  7. package/schemas/module/module.yml +4 -0
  8. package/schemas/module/query.yml +9 -0
  9. package/skills/erp-kit-app-1-requirements/SKILL.md +4 -4
  10. package/skills/erp-kit-app-2-requirements-review/SKILL.md +102 -0
  11. package/skills/erp-kit-app-2-requirements-review/references/best-practices-check.md +66 -0
  12. package/skills/erp-kit-app-2-requirements-review/references/boundary-consistency-check.md +69 -0
  13. package/skills/erp-kit-app-2-requirements-review/references/requirements-report-format.md +25 -0
  14. package/skills/erp-kit-app-3-plan/SKILL.md +157 -0
  15. package/skills/erp-kit-app-3-plan/references/resolver-extraction.md +107 -0
  16. package/skills/erp-kit-app-3-plan/references/screen-extraction.md +74 -0
  17. package/skills/erp-kit-app-3-plan/references/story-extraction.md +86 -0
  18. package/skills/erp-kit-app-4-plan-review/SKILL.md +177 -0
  19. package/skills/erp-kit-app-4-plan-review/references/actor-flow-parity.md +73 -0
  20. package/skills/erp-kit-app-4-plan-review/references/business-flow-story-parity.md +86 -0
  21. package/skills/erp-kit-app-4-plan-review/references/orphan-detection.md +69 -0
  22. package/skills/erp-kit-app-4-plan-review/references/parity-report-format.md +52 -0
  23. package/skills/erp-kit-app-4-plan-review/references/story-resolver-parity.md +83 -0
  24. package/skills/erp-kit-app-4-plan-review/references/story-screen-parity.md +73 -0
  25. package/skills/{erp-kit-app-5-implementation → erp-kit-app-5-impl-backend}/SKILL.md +24 -68
  26. package/skills/erp-kit-app-5-impl-backend/references/app-config.md +38 -0
  27. package/skills/erp-kit-app-5-impl-backend/references/module-wiring.md +48 -0
  28. package/skills/erp-kit-app-5-impl-backend/references/resolver-patterns.md +68 -0
  29. package/skills/erp-kit-app-6-impl-frontend/SKILL.md +74 -0
  30. package/skills/{erp-kit-app-5-implementation/references/frontend.md → erp-kit-app-6-impl-frontend/references/pages.md} +8 -90
  31. package/skills/erp-kit-app-7-impl-review/SKILL.md +176 -0
  32. package/skills/erp-kit-app-7-impl-review/references/impl-parity-report-format.md +52 -0
  33. package/skills/erp-kit-app-7-impl-review/references/module-wiring-parity.md +84 -0
  34. package/skills/erp-kit-app-7-impl-review/references/resolver-doc-code-parity.md +86 -0
  35. package/skills/erp-kit-app-7-impl-review/references/screen-doc-code-parity.md +86 -0
  36. package/skills/erp-kit-module-1-requirements/SKILL.md +126 -0
  37. package/skills/erp-kit-module-1-requirements/references/boundary-analysis.md +51 -0
  38. package/skills/erp-kit-module-1-requirements/references/erp-research.md +57 -0
  39. package/skills/erp-kit-module-1-requirements/references/feature-doc.md +61 -0
  40. package/skills/erp-kit-module-2-requirements-review/SKILL.md +112 -0
  41. package/skills/erp-kit-module-2-requirements-review/references/best-practices-check.md +79 -0
  42. package/skills/erp-kit-module-2-requirements-review/references/boundary-consistency-check.md +70 -0
  43. package/skills/erp-kit-module-2-requirements-review/references/requirements-report-format.md +25 -0
  44. package/skills/erp-kit-module-3-plan/SKILL.md +107 -0
  45. package/skills/erp-kit-module-3-plan/references/command-extraction.md +87 -0
  46. package/skills/erp-kit-module-3-plan/references/model-extraction.md +72 -0
  47. package/skills/erp-kit-module-3-plan/references/query-extraction.md +59 -0
  48. package/skills/erp-kit-module-4-plan-review/SKILL.md +158 -0
  49. package/skills/erp-kit-module-4-plan-review/references/command-model-consistency.md +46 -0
  50. package/skills/erp-kit-module-4-plan-review/references/feature-command-parity.md +97 -0
  51. package/skills/erp-kit-module-4-plan-review/references/feature-model-parity.md +47 -0
  52. package/skills/erp-kit-module-4-plan-review/references/feature-query-parity.md +70 -0
  53. package/skills/erp-kit-module-4-plan-review/references/parity-report-format.md +52 -0
  54. package/skills/erp-kit-module-5-impl/SKILL.md +118 -0
  55. package/skills/erp-kit-module-5-impl/references/command-impl.md +68 -0
  56. package/skills/erp-kit-module-5-impl/references/exports.md +10 -0
  57. package/skills/erp-kit-module-5-impl/references/model-impl.md +45 -0
  58. package/skills/erp-kit-module-5-impl/references/query-impl.md +53 -0
  59. package/skills/erp-kit-module-6-impl-review/SKILL.md +187 -0
  60. package/skills/erp-kit-module-6-impl-review/references/command-doc-code-parity.md +92 -0
  61. package/skills/erp-kit-module-6-impl-review/references/command-doc-test-parity.md +93 -0
  62. package/skills/erp-kit-module-6-impl-review/references/error-implementation-parity.md +95 -0
  63. package/skills/{erp-kit-module-5-impl-review → erp-kit-module-6-impl-review}/references/errors.md +1 -1
  64. package/skills/erp-kit-module-6-impl-review/references/impl-parity-report-format.md +52 -0
  65. package/skills/erp-kit-module-6-impl-review/references/model-doc-code-parity.md +80 -0
  66. package/skills/erp-kit-module-shared/SKILL.md +1 -1
  67. package/skills/erp-kit-module-shared/references/commands.md +1 -1
  68. package/skills/erp-kit-module-shared/references/errors.md +12 -9
  69. package/skills/erp-kit-module-shared/references/queries.md +109 -36
  70. package/skills/erp-kit-module-shared/references/testing.md +10 -0
  71. package/skills/erp-kit-update/SKILL.md +2 -2
  72. package/src/app.ts +1 -1
  73. package/src/commands/check.ts +1 -1
  74. package/src/commands/index.ts +16 -5
  75. package/src/commands/init.test.ts +22 -69
  76. package/src/commands/init.ts +28 -115
  77. package/src/commands/lib/distribute.test.ts +126 -0
  78. package/src/commands/lib/distribute.ts +129 -0
  79. package/src/commands/parse-doc-test-cases.ts +55 -0
  80. package/src/commands/scaffold.test.ts +74 -33
  81. package/src/commands/scaffold.ts +54 -18
  82. package/src/commands/sync-check.test.ts +173 -0
  83. package/src/commands/sync-check.ts +103 -2
  84. package/src/commands/update.test.ts +87 -0
  85. package/src/commands/update.ts +41 -0
  86. package/src/generator/generate-code.test.ts +23 -12
  87. package/src/generator/generate-code.ts +22 -16
  88. package/src/integration.test.ts +1 -1
  89. package/src/module.ts +14 -97
  90. package/src/modules/item-management/README.md +8 -0
  91. package/src/modules/item-management/command/activateItem.generated.ts +1 -1
  92. package/src/modules/item-management/command/activateItem.test.ts +12 -18
  93. package/src/modules/item-management/command/activateItem.ts +9 -5
  94. package/src/modules/item-management/command/assignItemToTaxonomy.generated.ts +1 -1
  95. package/src/modules/item-management/command/assignItemToTaxonomy.test.ts +10 -24
  96. package/src/modules/item-management/command/assignItemToTaxonomy.ts +19 -16
  97. package/src/modules/item-management/command/createItem.generated.ts +1 -1
  98. package/src/modules/item-management/command/createItem.test.ts +11 -11
  99. package/src/modules/item-management/command/createItem.ts +16 -7
  100. package/src/modules/item-management/command/createTaxonomyNode.generated.ts +1 -1
  101. package/src/modules/item-management/command/createTaxonomyNode.test.ts +9 -9
  102. package/src/modules/item-management/command/createTaxonomyNode.ts +33 -14
  103. package/src/modules/item-management/command/deactivateItem.generated.ts +1 -1
  104. package/src/modules/item-management/command/deactivateItem.test.ts +12 -18
  105. package/src/modules/item-management/command/deactivateItem.ts +9 -5
  106. package/src/modules/item-management/command/deleteItem.generated.ts +1 -1
  107. package/src/modules/item-management/command/deleteItem.test.ts +10 -16
  108. package/src/modules/item-management/command/deleteItem.ts +9 -5
  109. package/src/modules/item-management/command/deleteTaxonomyNode.generated.ts +1 -1
  110. package/src/modules/item-management/command/deleteTaxonomyNode.test.ts +10 -16
  111. package/src/modules/item-management/command/deleteTaxonomyNode.ts +22 -12
  112. package/src/modules/item-management/command/moveTaxonomyNode.generated.ts +1 -1
  113. package/src/modules/item-management/command/moveTaxonomyNode.test.ts +10 -10
  114. package/src/modules/item-management/command/moveTaxonomyNode.ts +63 -19
  115. package/src/modules/item-management/command/reactivateItem.generated.ts +1 -1
  116. package/src/modules/item-management/command/reactivateItem.test.ts +12 -18
  117. package/src/modules/item-management/command/reactivateItem.ts +9 -5
  118. package/src/modules/item-management/command/removeItemFromTaxonomy.generated.ts +1 -1
  119. package/src/modules/item-management/command/removeItemFromTaxonomy.test.ts +9 -16
  120. package/src/modules/item-management/command/removeItemFromTaxonomy.ts +11 -6
  121. package/src/modules/item-management/command/updateItem.generated.ts +1 -1
  122. package/src/modules/item-management/command/updateItem.test.ts +16 -16
  123. package/src/modules/item-management/command/updateItem.ts +11 -6
  124. package/src/modules/item-management/command/updateTaxonomyNode.generated.ts +1 -1
  125. package/src/modules/item-management/command/updateTaxonomyNode.test.ts +14 -20
  126. package/src/modules/item-management/command/updateTaxonomyNode.ts +9 -6
  127. package/src/modules/item-management/docs/commands/ActivateItem.md +8 -0
  128. package/src/modules/item-management/docs/commands/AssignItemToTaxonomy.md +7 -0
  129. package/src/modules/item-management/docs/commands/CreateItem.md +10 -0
  130. package/src/modules/item-management/docs/commands/CreateTaxonomyNode.md +9 -0
  131. package/src/modules/item-management/docs/commands/DeactivateItem.md +8 -0
  132. package/src/modules/item-management/docs/commands/DeleteItem.md +7 -0
  133. package/src/modules/item-management/docs/commands/DeleteTaxonomyNode.md +7 -0
  134. package/src/modules/item-management/docs/commands/MoveTaxonomyNode.md +10 -0
  135. package/src/modules/item-management/docs/commands/ReactivateItem.md +8 -0
  136. package/src/modules/item-management/docs/commands/RemoveItemFromTaxonomy.md +5 -0
  137. package/src/modules/item-management/docs/commands/UpdateItem.md +15 -0
  138. package/src/modules/item-management/docs/commands/UpdateTaxonomyNode.md +9 -0
  139. package/src/modules/item-management/docs/queries/CalculateNodeDepth.md +8 -0
  140. package/src/modules/item-management/docs/queries/CalculateSubtreeDepth.md +7 -0
  141. package/src/modules/item-management/docs/queries/DetectCircularReference.md +9 -0
  142. package/src/modules/item-management/docs/queries/GetItem.md +9 -0
  143. package/src/modules/item-management/docs/queries/GetItemTaxonomyAssignment.md +5 -0
  144. package/src/modules/item-management/docs/queries/GetTaxonomyNode.md +7 -0
  145. package/src/modules/item-management/docs/queries/GetTaxonomyNodeAssignments.md +5 -0
  146. package/src/modules/item-management/docs/queries/GetTaxonomyNodeChildren.md +6 -0
  147. package/src/modules/item-management/index.ts +0 -51
  148. package/src/modules/item-management/lib/errors.generated.ts +24 -24
  149. package/src/modules/item-management/lib/permissions.generated.ts +1 -1
  150. package/src/modules/item-management/lib/types.ts +1 -1
  151. package/src/modules/item-management/module.ts +1 -1
  152. package/src/modules/item-management/query/calculateNodeDepth.generated.ts +1 -1
  153. package/src/modules/item-management/query/calculateNodeDepth.test.ts +21 -6
  154. package/src/modules/item-management/query/calculateNodeDepth.ts +2 -2
  155. package/src/modules/item-management/query/calculateSubtreeDepth.generated.ts +1 -1
  156. package/src/modules/item-management/query/calculateSubtreeDepth.test.ts +17 -5
  157. package/src/modules/item-management/query/calculateSubtreeDepth.ts +2 -2
  158. package/src/modules/item-management/query/detectCircularReference.generated.ts +1 -1
  159. package/src/modules/item-management/query/detectCircularReference.test.ts +25 -7
  160. package/src/modules/item-management/query/detectCircularReference.ts +4 -4
  161. package/src/modules/item-management/query/getItem.generated.ts +1 -1
  162. package/src/modules/item-management/query/getItem.test.ts +25 -7
  163. package/src/modules/item-management/query/getItem.ts +2 -2
  164. package/src/modules/item-management/query/getItemTaxonomyAssignment.generated.ts +1 -1
  165. package/src/modules/item-management/query/getItemTaxonomyAssignment.test.ts +9 -3
  166. package/src/modules/item-management/query/getItemTaxonomyAssignment.ts +2 -2
  167. package/src/modules/item-management/query/getTaxonomyNode.generated.ts +1 -1
  168. package/src/modules/item-management/query/getTaxonomyNode.test.ts +17 -5
  169. package/src/modules/item-management/query/getTaxonomyNode.ts +2 -2
  170. package/src/modules/item-management/query/getTaxonomyNodeAssignments.generated.ts +1 -1
  171. package/src/modules/item-management/query/getTaxonomyNodeAssignments.test.ts +9 -3
  172. package/src/modules/item-management/query/getTaxonomyNodeAssignments.ts +2 -2
  173. package/src/modules/item-management/query/getTaxonomyNodeChildren.generated.ts +1 -1
  174. package/src/modules/item-management/query/getTaxonomyNodeChildren.test.ts +13 -4
  175. package/src/modules/item-management/query/getTaxonomyNodeChildren.ts +2 -2
  176. package/src/modules/item-management/tailor.config.ts +6 -4
  177. package/src/modules/item-management/tailor.d.ts +13 -0
  178. package/src/modules/primitives/README.md +8 -0
  179. package/src/modules/primitives/command/activateCategory.generated.ts +1 -1
  180. package/src/modules/primitives/command/activateCategory.test.ts +8 -18
  181. package/src/modules/primitives/command/activateCategory.ts +9 -5
  182. package/src/modules/primitives/command/activateCurrency.generated.ts +1 -1
  183. package/src/modules/primitives/command/activateCurrency.test.ts +8 -18
  184. package/src/modules/primitives/command/activateCurrency.ts +9 -5
  185. package/src/modules/primitives/command/activateUnit.generated.ts +1 -1
  186. package/src/modules/primitives/command/activateUnit.test.ts +8 -15
  187. package/src/modules/primitives/command/activateUnit.ts +9 -5
  188. package/src/modules/primitives/command/createCategory.generated.ts +1 -1
  189. package/src/modules/primitives/command/createCategory.test.ts +29 -44
  190. package/src/modules/primitives/command/createCategory.ts +9 -5
  191. package/src/modules/primitives/command/createCurrency.generated.ts +1 -1
  192. package/src/modules/primitives/command/createCurrency.test.ts +53 -78
  193. package/src/modules/primitives/command/createCurrency.ts +9 -6
  194. package/src/modules/primitives/command/createExchangeRate.generated.ts +1 -1
  195. package/src/modules/primitives/command/createExchangeRate.test.ts +59 -97
  196. package/src/modules/primitives/command/createExchangeRate.ts +13 -7
  197. package/src/modules/primitives/command/createUnit.generated.ts +1 -1
  198. package/src/modules/primitives/command/createUnit.test.ts +59 -90
  199. package/src/modules/primitives/command/createUnit.ts +9 -6
  200. package/src/modules/primitives/command/deactivateCategory.generated.ts +1 -1
  201. package/src/modules/primitives/command/deactivateCategory.test.ts +15 -33
  202. package/src/modules/primitives/command/deactivateCategory.ts +9 -5
  203. package/src/modules/primitives/command/deactivateCurrency.generated.ts +1 -1
  204. package/src/modules/primitives/command/deactivateCurrency.test.ts +12 -26
  205. package/src/modules/primitives/command/deactivateCurrency.ts +9 -5
  206. package/src/modules/primitives/command/deactivateUnit.generated.ts +1 -1
  207. package/src/modules/primitives/command/deactivateUnit.test.ts +15 -30
  208. package/src/modules/primitives/command/deactivateUnit.ts +14 -7
  209. package/src/modules/primitives/command/setBaseCurrency.generated.ts +1 -1
  210. package/src/modules/primitives/command/setBaseCurrency.test.ts +18 -40
  211. package/src/modules/primitives/command/setBaseCurrency.ts +15 -7
  212. package/src/modules/primitives/command/setReferenceUnit.generated.ts +1 -1
  213. package/src/modules/primitives/command/setReferenceUnit.test.ts +22 -44
  214. package/src/modules/primitives/command/setReferenceUnit.ts +21 -9
  215. package/src/modules/primitives/docs/commands/ActivateCategory.md +6 -0
  216. package/src/modules/primitives/docs/commands/ActivateCurrency.md +6 -0
  217. package/src/modules/primitives/docs/commands/ActivateUnit.md +6 -0
  218. package/src/modules/primitives/docs/commands/CreateCategory.md +6 -0
  219. package/src/modules/primitives/docs/commands/CreateCurrency.md +10 -0
  220. package/src/modules/primitives/docs/commands/CreateExchangeRate.md +11 -0
  221. package/src/modules/primitives/docs/commands/CreateUnit.md +10 -0
  222. package/src/modules/primitives/docs/commands/DeactivateCategory.md +7 -0
  223. package/src/modules/primitives/docs/commands/DeactivateCurrency.md +7 -0
  224. package/src/modules/primitives/docs/commands/DeactivateUnit.md +7 -0
  225. package/src/modules/primitives/docs/commands/SetBaseCurrency.md +7 -0
  226. package/src/modules/primitives/docs/commands/SetReferenceUnit.md +7 -0
  227. package/src/modules/primitives/docs/queries/ConvertAmount.md +14 -0
  228. package/src/modules/primitives/docs/queries/ConvertQuantity.md +13 -0
  229. package/src/modules/primitives/docs/queries/GetBaseCurrency.md +5 -0
  230. package/src/modules/primitives/docs/queries/GetCurrency.md +7 -0
  231. package/src/modules/primitives/docs/queries/GetUnit.md +7 -0
  232. package/src/modules/primitives/docs/queries/GetUoMCategory.md +7 -0
  233. package/src/modules/primitives/docs/queries/ListUnitsByCategory.md +15 -5
  234. package/src/modules/primitives/index.ts +0 -49
  235. package/src/modules/primitives/lib/errors.generated.ts +23 -23
  236. package/src/modules/primitives/lib/permissions.generated.ts +1 -1
  237. package/src/modules/primitives/lib/types.ts +1 -1
  238. package/src/modules/primitives/module.ts +1 -1
  239. package/src/modules/primitives/query/convertAmount.generated.ts +1 -1
  240. package/src/modules/primitives/query/convertAmount.test.ts +110 -77
  241. package/src/modules/primitives/query/convertAmount.ts +61 -47
  242. package/src/modules/primitives/query/convertQuantity.generated.ts +1 -1
  243. package/src/modules/primitives/query/convertQuantity.test.ts +99 -69
  244. package/src/modules/primitives/query/convertQuantity.ts +12 -10
  245. package/src/modules/primitives/query/getBaseCurrency.generated.ts +1 -1
  246. package/src/modules/primitives/query/getBaseCurrency.test.ts +10 -4
  247. package/src/modules/primitives/query/getBaseCurrency.ts +2 -2
  248. package/src/modules/primitives/query/getCurrency.generated.ts +1 -1
  249. package/src/modules/primitives/query/getCurrency.test.ts +17 -5
  250. package/src/modules/primitives/query/getCurrency.ts +2 -2
  251. package/src/modules/primitives/query/getUnit.generated.ts +1 -1
  252. package/src/modules/primitives/query/getUnit.test.ts +17 -5
  253. package/src/modules/primitives/query/getUnit.ts +2 -2
  254. package/src/modules/primitives/query/getUoMCategory.generated.ts +1 -1
  255. package/src/modules/primitives/query/getUoMCategory.test.ts +17 -5
  256. package/src/modules/primitives/query/getUoMCategory.ts +2 -2
  257. package/src/modules/primitives/query/listUnitsByCategory.generated.ts +1 -1
  258. package/src/modules/primitives/query/listUnitsByCategory.test.ts +80 -0
  259. package/src/modules/primitives/query/listUnitsByCategory.ts +19 -3
  260. package/src/modules/primitives/tailor.config.ts +6 -4
  261. package/src/modules/primitives/tailor.d.ts +13 -0
  262. package/src/modules/product-management/README.md +52 -0
  263. package/src/modules/product-management/command/activateProduct.generated.ts +6 -0
  264. package/src/modules/product-management/command/activateProduct.test.ts +40 -0
  265. package/src/modules/product-management/command/activateProduct.ts +42 -0
  266. package/src/modules/product-management/command/assignProductToCategory.generated.ts +6 -0
  267. package/src/modules/product-management/command/assignProductToCategory.test.ts +90 -0
  268. package/src/modules/product-management/command/assignProductToCategory.ts +62 -0
  269. package/src/modules/product-management/command/createProduct.generated.ts +6 -0
  270. package/src/modules/product-management/command/createProduct.test.ts +149 -0
  271. package/src/modules/product-management/command/createProduct.ts +73 -0
  272. package/src/modules/product-management/command/createProductAttribute.generated.ts +6 -0
  273. package/src/modules/product-management/command/createProductAttribute.test.ts +70 -0
  274. package/src/modules/product-management/command/createProductAttribute.ts +53 -0
  275. package/src/modules/product-management/command/createProductAttributeValue.generated.ts +6 -0
  276. package/src/modules/product-management/command/createProductAttributeValue.test.ts +68 -0
  277. package/src/modules/product-management/command/createProductAttributeValue.ts +63 -0
  278. package/src/modules/product-management/command/createProductCategory.generated.ts +6 -0
  279. package/src/modules/product-management/command/createProductCategory.test.ts +135 -0
  280. package/src/modules/product-management/command/createProductCategory.ts +82 -0
  281. package/src/modules/product-management/command/deactivateProduct.generated.ts +6 -0
  282. package/src/modules/product-management/command/deactivateProduct.test.ts +40 -0
  283. package/src/modules/product-management/command/deactivateProduct.ts +42 -0
  284. package/src/modules/product-management/command/deleteProduct.generated.ts +6 -0
  285. package/src/modules/product-management/command/deleteProduct.test.ts +42 -0
  286. package/src/modules/product-management/command/deleteProduct.ts +42 -0
  287. package/src/modules/product-management/command/deleteProductAttribute.generated.ts +6 -0
  288. package/src/modules/product-management/command/deleteProductAttribute.test.ts +49 -0
  289. package/src/modules/product-management/command/deleteProductAttribute.ts +45 -0
  290. package/src/modules/product-management/command/deleteProductAttributeValue.generated.ts +6 -0
  291. package/src/modules/product-management/command/deleteProductAttributeValue.test.ts +71 -0
  292. package/src/modules/product-management/command/deleteProductAttributeValue.ts +68 -0
  293. package/src/modules/product-management/command/deleteProductCategory.generated.ts +6 -0
  294. package/src/modules/product-management/command/deleteProductCategory.test.ts +74 -0
  295. package/src/modules/product-management/command/deleteProductCategory.ts +53 -0
  296. package/src/modules/product-management/command/generateVariants.generated.ts +6 -0
  297. package/src/modules/product-management/command/generateVariants.test.ts +365 -0
  298. package/src/modules/product-management/command/generateVariants.ts +168 -0
  299. package/src/modules/product-management/command/moveProductCategory.generated.ts +6 -0
  300. package/src/modules/product-management/command/moveProductCategory.test.ts +170 -0
  301. package/src/modules/product-management/command/moveProductCategory.ts +124 -0
  302. package/src/modules/product-management/command/reactivateProduct.generated.ts +6 -0
  303. package/src/modules/product-management/command/reactivateProduct.test.ts +40 -0
  304. package/src/modules/product-management/command/reactivateProduct.ts +42 -0
  305. package/src/modules/product-management/command/removeProductFromCategory.generated.ts +6 -0
  306. package/src/modules/product-management/command/removeProductFromCategory.test.ts +42 -0
  307. package/src/modules/product-management/command/removeProductFromCategory.ts +32 -0
  308. package/src/modules/product-management/command/setProductAttributeAssignment.generated.ts +6 -0
  309. package/src/modules/product-management/command/setProductAttributeAssignment.test.ts +206 -0
  310. package/src/modules/product-management/command/setProductAttributeAssignment.ts +102 -0
  311. package/src/modules/product-management/command/updateProduct.generated.ts +6 -0
  312. package/src/modules/product-management/command/updateProduct.test.ts +168 -0
  313. package/src/modules/product-management/command/updateProduct.ts +95 -0
  314. package/src/modules/product-management/command/updateProductAttribute.generated.ts +6 -0
  315. package/src/modules/product-management/command/updateProductAttribute.test.ts +101 -0
  316. package/src/modules/product-management/command/updateProductAttribute.ts +68 -0
  317. package/src/modules/product-management/command/updateProductAttributeValue.generated.ts +6 -0
  318. package/src/modules/product-management/command/updateProductAttributeValue.test.ts +80 -0
  319. package/src/modules/product-management/command/updateProductAttributeValue.ts +58 -0
  320. package/src/modules/product-management/command/updateProductCategory.generated.ts +6 -0
  321. package/src/modules/product-management/command/updateProductCategory.test.ts +80 -0
  322. package/src/modules/product-management/command/updateProductCategory.ts +66 -0
  323. package/src/modules/product-management/db/product.ts +47 -0
  324. package/src/modules/product-management/db/productAttribute.ts +26 -0
  325. package/src/modules/product-management/db/productAttributeAssignment.ts +58 -0
  326. package/src/modules/product-management/db/productAttributeValue.ts +39 -0
  327. package/src/modules/product-management/db/productCategory.ts +34 -0
  328. package/src/modules/product-management/db/productCategoryAssignment.ts +49 -0
  329. package/src/modules/product-management/db/productVariant.ts +52 -0
  330. package/src/modules/product-management/docs/commands/ActivateProduct.md +39 -0
  331. package/src/modules/product-management/docs/commands/AssignProductToCategory.md +43 -0
  332. package/src/modules/product-management/docs/commands/CreateProduct.md +48 -0
  333. package/src/modules/product-management/docs/commands/CreateProductAttribute.md +39 -0
  334. package/src/modules/product-management/docs/commands/CreateProductAttributeValue.md +42 -0
  335. package/src/modules/product-management/docs/commands/CreateProductCategory.md +54 -0
  336. package/src/modules/product-management/docs/commands/DeactivateProduct.md +39 -0
  337. package/src/modules/product-management/docs/commands/DeleteProduct.md +42 -0
  338. package/src/modules/product-management/docs/commands/DeleteProductAttribute.md +39 -0
  339. package/src/modules/product-management/docs/commands/DeleteProductAttributeValue.md +42 -0
  340. package/src/modules/product-management/docs/commands/DeleteProductCategory.md +43 -0
  341. package/src/modules/product-management/docs/commands/GenerateVariants.md +68 -0
  342. package/src/modules/product-management/docs/commands/MoveProductCategory.md +54 -0
  343. package/src/modules/product-management/docs/commands/ReactivateProduct.md +38 -0
  344. package/src/modules/product-management/docs/commands/RemoveProductFromCategory.md +34 -0
  345. package/src/modules/product-management/docs/commands/SetProductAttributeAssignment.md +62 -0
  346. package/src/modules/product-management/docs/commands/UpdateProduct.md +61 -0
  347. package/src/modules/product-management/docs/commands/UpdateProductAttribute.md +46 -0
  348. package/src/modules/product-management/docs/commands/UpdateProductAttributeValue.md +47 -0
  349. package/src/modules/product-management/docs/commands/UpdateProductCategory.md +46 -0
  350. package/src/modules/product-management/docs/features/attribute-management.md +48 -0
  351. package/src/modules/product-management/docs/features/product-category.md +71 -0
  352. package/src/modules/product-management/docs/features/product-lifecycle.md +66 -0
  353. package/src/modules/product-management/docs/features/variant-generation.md +77 -0
  354. package/src/modules/product-management/docs/models/Product.md +58 -0
  355. package/src/modules/product-management/docs/models/ProductAttribute.md +37 -0
  356. package/src/modules/product-management/docs/models/ProductAttributeAssignment.md +41 -0
  357. package/src/modules/product-management/docs/models/ProductAttributeValue.md +40 -0
  358. package/src/modules/product-management/docs/models/ProductCategory.md +46 -0
  359. package/src/modules/product-management/docs/models/ProductCategoryAssignment.md +37 -0
  360. package/src/modules/product-management/docs/models/ProductVariant.md +41 -0
  361. package/src/modules/product-management/docs/queries/CalculateCategoryDepth.md +47 -0
  362. package/src/modules/product-management/docs/queries/DetectCategoryCircularReference.md +51 -0
  363. package/src/modules/product-management/docs/queries/GetProduct.md +42 -0
  364. package/src/modules/product-management/docs/queries/GetProductAttribute.md +42 -0
  365. package/src/modules/product-management/docs/queries/GetProductAttributeAssignment.md +34 -0
  366. package/src/modules/product-management/docs/queries/GetProductAttributeValue.md +40 -0
  367. package/src/modules/product-management/docs/queries/GetProductCategory.md +42 -0
  368. package/src/modules/product-management/docs/queries/GetProductCategoryAssignment.md +34 -0
  369. package/src/modules/product-management/docs/queries/GetProductVariant.md +41 -0
  370. package/src/modules/product-management/docs/queries/ListAttributeAssignmentsByAttribute.md +34 -0
  371. package/src/modules/product-management/docs/queries/ListCategoryAssignmentsByProduct.md +35 -0
  372. package/src/modules/product-management/docs/queries/ListProductAttributeAssignments.md +34 -0
  373. package/src/modules/product-management/docs/queries/ListProductAttributeValues.md +36 -0
  374. package/src/modules/product-management/docs/queries/ListProductCategoryAssignments.md +34 -0
  375. package/src/modules/product-management/docs/queries/ListProductCategoryChildren.md +34 -0
  376. package/src/modules/product-management/docs/queries/ListProductVariants.md +34 -0
  377. package/src/modules/product-management/generated/enums.ts +9 -0
  378. package/src/modules/product-management/generated/kysely-tailordb.ts +100 -0
  379. package/src/modules/product-management/index.ts +2 -0
  380. package/src/modules/product-management/lib/_db_deps.ts +17 -0
  381. package/src/modules/product-management/lib/errors.generated.ts +152 -0
  382. package/src/modules/product-management/lib/permissions.generated.ts +25 -0
  383. package/src/modules/product-management/lib/types.ts +51 -0
  384. package/src/modules/product-management/module.ts +201 -0
  385. package/src/modules/product-management/query/calculateCategoryDepth.generated.ts +5 -0
  386. package/src/modules/product-management/query/calculateCategoryDepth.test.ts +72 -0
  387. package/src/modules/product-management/query/calculateCategoryDepth.ts +37 -0
  388. package/src/modules/product-management/query/detectCategoryCircularReference.generated.ts +5 -0
  389. package/src/modules/product-management/query/detectCategoryCircularReference.test.ts +72 -0
  390. package/src/modules/product-management/query/detectCategoryCircularReference.ts +44 -0
  391. package/src/modules/product-management/query/getProduct.generated.ts +5 -0
  392. package/src/modules/product-management/query/getProduct.test.ts +59 -0
  393. package/src/modules/product-management/query/getProduct.ts +18 -0
  394. package/src/modules/product-management/query/getProductAttribute.generated.ts +5 -0
  395. package/src/modules/product-management/query/getProductAttribute.test.ts +59 -0
  396. package/src/modules/product-management/query/getProductAttribute.ts +18 -0
  397. package/src/modules/product-management/query/getProductAttributeAssignment.generated.ts +5 -0
  398. package/src/modules/product-management/query/getProductAttributeAssignment.test.ts +37 -0
  399. package/src/modules/product-management/query/getProductAttributeAssignment.ts +18 -0
  400. package/src/modules/product-management/query/getProductAttributeValue.generated.ts +5 -0
  401. package/src/modules/product-management/query/getProductAttributeValue.test.ts +31 -0
  402. package/src/modules/product-management/query/getProductAttributeValue.ts +16 -0
  403. package/src/modules/product-management/query/getProductCategory.generated.ts +5 -0
  404. package/src/modules/product-management/query/getProductCategory.test.ts +59 -0
  405. package/src/modules/product-management/query/getProductCategory.ts +18 -0
  406. package/src/modules/product-management/query/getProductCategoryAssignment.generated.ts +5 -0
  407. package/src/modules/product-management/query/getProductCategoryAssignment.test.ts +37 -0
  408. package/src/modules/product-management/query/getProductCategoryAssignment.ts +18 -0
  409. package/src/modules/product-management/query/getProductVariant.generated.ts +5 -0
  410. package/src/modules/product-management/query/getProductVariant.test.ts +43 -0
  411. package/src/modules/product-management/query/getProductVariant.ts +20 -0
  412. package/src/modules/product-management/query/listAttributeAssignmentsByAttribute.generated.ts +5 -0
  413. package/src/modules/product-management/query/listAttributeAssignmentsByAttribute.test.ts +31 -0
  414. package/src/modules/product-management/query/listAttributeAssignmentsByAttribute.ts +16 -0
  415. package/src/modules/product-management/query/listCategoryAssignmentsByProduct.generated.ts +5 -0
  416. package/src/modules/product-management/query/listCategoryAssignmentsByProduct.test.ts +31 -0
  417. package/src/modules/product-management/query/listCategoryAssignmentsByProduct.ts +16 -0
  418. package/src/modules/product-management/query/listProductAttributeAssignments.generated.ts +5 -0
  419. package/src/modules/product-management/query/listProductAttributeAssignments.test.ts +31 -0
  420. package/src/modules/product-management/query/listProductAttributeAssignments.ts +16 -0
  421. package/src/modules/product-management/query/listProductAttributeValues.generated.ts +5 -0
  422. package/src/modules/product-management/query/listProductAttributeValues.test.ts +31 -0
  423. package/src/modules/product-management/query/listProductAttributeValues.ts +17 -0
  424. package/src/modules/product-management/query/listProductCategoryAssignments.generated.ts +5 -0
  425. package/src/modules/product-management/query/listProductCategoryAssignments.test.ts +31 -0
  426. package/src/modules/product-management/query/listProductCategoryAssignments.ts +16 -0
  427. package/src/modules/product-management/query/listProductCategoryChildren.generated.ts +5 -0
  428. package/src/modules/product-management/query/listProductCategoryChildren.test.ts +31 -0
  429. package/src/modules/product-management/query/listProductCategoryChildren.ts +16 -0
  430. package/src/modules/product-management/query/listProductVariants.generated.ts +5 -0
  431. package/src/modules/product-management/query/listProductVariants.test.ts +31 -0
  432. package/src/modules/product-management/query/listProductVariants.ts +16 -0
  433. package/src/modules/product-management/tailor.config.ts +13 -0
  434. package/src/modules/product-management/tailor.d.ts +13 -0
  435. package/src/modules/product-management/testing/fixtures.ts +151 -0
  436. package/src/modules/user-management/README.md +9 -3
  437. package/src/modules/user-management/command/activateUser.generated.ts +1 -1
  438. package/src/modules/user-management/command/activateUser.test.ts +12 -65
  439. package/src/modules/user-management/command/activateUser.ts +5 -20
  440. package/src/modules/user-management/command/assignPermissionToRole.generated.ts +1 -1
  441. package/src/modules/user-management/command/assignPermissionToRole.test.ts +25 -60
  442. package/src/modules/user-management/command/assignPermissionToRole.ts +5 -24
  443. package/src/modules/user-management/command/assignRoleToUser.generated.ts +1 -1
  444. package/src/modules/user-management/command/assignRoleToUser.test.ts +35 -87
  445. package/src/modules/user-management/command/assignRoleToUser.ts +5 -24
  446. package/src/modules/user-management/command/createPermission.generated.ts +1 -1
  447. package/src/modules/user-management/command/createPermission.test.ts +23 -33
  448. package/src/modules/user-management/command/createPermission.ts +4 -5
  449. package/src/modules/user-management/command/createRole.generated.ts +1 -1
  450. package/src/modules/user-management/command/createRole.test.ts +17 -27
  451. package/src/modules/user-management/command/createRole.ts +4 -5
  452. package/src/modules/user-management/command/createUser.generated.ts +1 -1
  453. package/src/modules/user-management/command/createUser.test.ts +31 -118
  454. package/src/modules/user-management/command/createUser.ts +7 -25
  455. package/src/modules/user-management/command/deactivateUser.generated.ts +1 -1
  456. package/src/modules/user-management/command/deactivateUser.test.ts +12 -65
  457. package/src/modules/user-management/command/deactivateUser.ts +6 -21
  458. package/src/modules/user-management/command/reactivateUser.generated.ts +1 -1
  459. package/src/modules/user-management/command/reactivateUser.test.ts +13 -66
  460. package/src/modules/user-management/command/reactivateUser.ts +5 -20
  461. package/src/modules/user-management/command/revokePermissionFromRole.generated.ts +1 -1
  462. package/src/modules/user-management/command/revokePermissionFromRole.test.ts +24 -62
  463. package/src/modules/user-management/command/revokePermissionFromRole.ts +5 -24
  464. package/src/modules/user-management/command/revokeRoleFromUser.generated.ts +1 -1
  465. package/src/modules/user-management/command/revokeRoleFromUser.test.ts +24 -60
  466. package/src/modules/user-management/command/revokeRoleFromUser.ts +5 -24
  467. package/src/modules/user-management/docs/commands/ActivateUser.md +7 -0
  468. package/src/modules/user-management/docs/commands/AssignPermissionToRole.md +7 -0
  469. package/src/modules/user-management/docs/commands/AssignRoleToUser.md +9 -0
  470. package/src/modules/user-management/docs/commands/CreatePermission.md +12 -0
  471. package/src/modules/user-management/docs/commands/CreateRole.md +9 -0
  472. package/src/modules/user-management/docs/commands/CreateUser.md +11 -0
  473. package/src/modules/user-management/docs/commands/DeactivateUser.md +7 -0
  474. package/src/modules/user-management/docs/commands/ReactivateUser.md +7 -0
  475. package/src/modules/user-management/docs/commands/RevokePermissionFromRole.md +7 -0
  476. package/src/modules/user-management/docs/commands/RevokeRoleFromUser.md +7 -0
  477. package/src/modules/user-management/index.ts +0 -30
  478. package/src/modules/user-management/lib/errors.generated.ts +14 -14
  479. package/src/modules/user-management/lib/permissions.generated.ts +1 -2
  480. package/src/modules/user-management/lib/recomputeUserPermissions.ts +4 -3
  481. package/src/modules/user-management/lib/types.ts +1 -1
  482. package/src/modules/user-management/module.ts +2 -7
  483. package/src/modules/user-management/tailor.config.ts +6 -4
  484. package/src/modules/user-management/tailor.d.ts +13 -0
  485. package/src/modules/user-management/testing/fixtures.ts +1 -20
  486. package/src/schemas.ts +1 -1
  487. package/src/{modules/shared → shared}/defineCommand.test.ts +23 -7
  488. package/src/{modules/shared → shared}/defineCommand.ts +19 -10
  489. package/src/{modules/shared/internal.ts → shared/index.ts} +9 -1
  490. package/src/shared/pagination.test.ts +43 -0
  491. package/src/shared/pagination.ts +22 -0
  492. package/src/{modules/shared → shared}/types.ts +13 -0
  493. package/src/{modules/testing → testing}/index.ts +14 -7
  494. package/src/testing.ts +1 -1
  495. package/src/util.ts +8 -0
  496. package/templates/config/license.config.json +4 -0
  497. package/templates/scaffold/app/backend/.env.example +1 -0
  498. package/templates/scaffold/app/backend/__dot__gitignore +4 -0
  499. package/templates/scaffold/app/backend/eslint.config.js +32 -0
  500. package/templates/scaffold/app/backend/package.json +31 -0
  501. package/templates/scaffold/app/backend/seed/data/AuditEvent.jsonl +0 -0
  502. package/templates/scaffold/app/backend/seed/data/Permission.jsonl +0 -0
  503. package/templates/scaffold/app/backend/seed/data/Permission.schema.ts +20 -0
  504. package/templates/scaffold/app/backend/seed/data/Role.jsonl +0 -0
  505. package/templates/scaffold/app/backend/seed/data/Role.schema.ts +20 -0
  506. package/templates/scaffold/app/backend/seed/data/RolePermission.jsonl +0 -0
  507. package/templates/scaffold/app/backend/seed/data/RolePermission.schema.ts +24 -0
  508. package/templates/scaffold/app/backend/seed/data/User.jsonl +1 -0
  509. package/templates/scaffold/app/backend/seed/data/User.schema.ts +20 -0
  510. package/templates/scaffold/app/backend/seed/data/UserRole.jsonl +0 -0
  511. package/templates/scaffold/app/backend/seed/data/UserRole.schema.ts +24 -0
  512. package/templates/scaffold/app/backend/seed/data/_User.jsonl +1 -0
  513. package/templates/scaffold/app/backend/seed/data/_User.schema.ts +30 -0
  514. package/templates/scaffold/app/backend/seed/exec.mjs +659 -0
  515. package/templates/scaffold/app/backend/src/executors/permissionCreated.ts +3 -0
  516. package/templates/scaffold/app/backend/src/executors/permissionDeleted.ts +3 -0
  517. package/templates/scaffold/app/backend/src/generated/kysely-tailordb.ts +83 -0
  518. package/templates/scaffold/app/backend/src/modules.ts +9 -0
  519. package/templates/scaffold/app/backend/src/resolvers/createUser.ts +46 -0
  520. package/templates/scaffold/app/backend/tailor.config.ts +68 -0
  521. package/templates/scaffold/app/backend/tailor.d.ts +15 -0
  522. package/templates/scaffold/app/backend/tsconfig.json +19 -0
  523. package/templates/scaffold/app/docs/actors/.gitkeep +0 -0
  524. package/templates/scaffold/app/docs/business-flow/.gitkeep +0 -0
  525. package/templates/scaffold/app/docs/resolver/.gitkeep +0 -0
  526. package/templates/scaffold/app/docs/screen/.gitkeep +0 -0
  527. package/templates/scaffold/app/frontend/.env.example +2 -0
  528. package/templates/scaffold/app/frontend/__dot__gitignore +3 -0
  529. package/templates/scaffold/app/frontend/components.json +23 -0
  530. package/templates/scaffold/app/frontend/eslint.config.js +48 -0
  531. package/templates/scaffold/app/frontend/index.html +13 -0
  532. package/templates/scaffold/app/frontend/package.json +53 -0
  533. package/templates/scaffold/app/frontend/scripts/generate-graphql.mjs +6 -0
  534. package/templates/scaffold/app/frontend/src/App.tsx +58 -0
  535. package/templates/scaffold/app/frontend/src/components/composed/empty-state.tsx +26 -0
  536. package/templates/scaffold/app/frontend/src/components/composed/error-fallback.tsx +28 -0
  537. package/templates/scaffold/app/frontend/src/components/composed/loading.tsx +13 -0
  538. package/templates/scaffold/app/frontend/src/components/ui/badge.tsx +39 -0
  539. package/templates/scaffold/app/frontend/src/components/ui/button.tsx +60 -0
  540. package/templates/scaffold/app/frontend/src/components/ui/card.tsx +75 -0
  541. package/templates/scaffold/app/frontend/src/components/ui/form.tsx +152 -0
  542. package/templates/scaffold/app/frontend/src/components/ui/input.tsx +21 -0
  543. package/templates/scaffold/app/frontend/src/components/ui/label.tsx +21 -0
  544. package/templates/scaffold/app/frontend/src/components/ui/spinner.tsx +16 -0
  545. package/templates/scaffold/app/frontend/src/components/ui/table.tsx +90 -0
  546. package/templates/scaffold/app/frontend/src/graphql/generated/graphql-env.d.ts +103 -0
  547. package/templates/scaffold/app/frontend/src/graphql/generated/schema.graphql +1235 -0
  548. package/templates/scaffold/app/frontend/src/graphql/index.ts +15 -0
  549. package/templates/scaffold/app/frontend/src/index.css +5 -0
  550. package/templates/scaffold/app/frontend/src/lib/auth-client.ts +17 -0
  551. package/templates/scaffold/app/frontend/src/lib/utils.ts +6 -0
  552. package/templates/scaffold/app/frontend/src/main.tsx +10 -0
  553. package/templates/scaffold/app/frontend/src/pages/page.tsx +20 -0
  554. package/templates/scaffold/app/frontend/src/pages/user-management/page.tsx +19 -0
  555. package/templates/scaffold/app/frontend/src/pages/user-management/profile/page.tsx +97 -0
  556. package/templates/scaffold/app/frontend/src/pages/user-management/user/[id]/components/user-detail.tsx +58 -0
  557. package/templates/scaffold/app/frontend/src/pages/user-management/user/[id]/page.tsx +51 -0
  558. package/templates/scaffold/app/frontend/src/pages/user-management/user/components/users-table.tsx +101 -0
  559. package/templates/scaffold/app/frontend/src/pages/user-management/user/create/components/create-user-form.tsx +99 -0
  560. package/templates/scaffold/app/frontend/src/pages/user-management/user/create/page.tsx +19 -0
  561. package/templates/scaffold/app/frontend/src/pages/user-management/user/page.tsx +61 -0
  562. package/templates/scaffold/app/frontend/src/providers/graphql-provider.tsx +21 -0
  563. package/templates/scaffold/app/frontend/tsconfig.app.json +35 -0
  564. package/templates/scaffold/app/frontend/tsconfig.json +16 -0
  565. package/templates/scaffold/app/frontend/tsconfig.node.json +23 -0
  566. package/templates/scaffold/app/frontend/vite.config.ts +23 -0
  567. package/templates/scaffold/module/command/.gitkeep +0 -0
  568. package/templates/scaffold/module/db/.gitkeep +0 -0
  569. package/templates/scaffold/module/executor/.gitkeep +0 -0
  570. package/templates/scaffold/module/generated/.gitkeep +0 -0
  571. package/templates/scaffold/module/index.ts +2 -0
  572. package/templates/scaffold/module/lib/errors.ts +1 -0
  573. package/templates/scaffold/module/lib/types.ts +4 -0
  574. package/templates/scaffold/module/module.ts +7 -0
  575. package/templates/scaffold/module/permissions.ts +3 -0
  576. package/templates/scaffold/module/query/.gitkeep +0 -0
  577. package/templates/scaffold/module/tailor.config.ts +13 -0
  578. package/templates/scaffold/module/testing/fixtures.ts +1 -0
  579. package/templates/workflows/erp-kit-check.yml +37 -0
  580. package/dist/cli.js +0 -1654
  581. package/skills/erp-kit-app-2-breakdown/SKILL.md +0 -88
  582. package/skills/erp-kit-app-3-doc-review/SKILL.md +0 -112
  583. package/skills/erp-kit-app-4-impl-spec/SKILL.md +0 -116
  584. package/skills/erp-kit-app-5-implementation/references/backend.md +0 -232
  585. package/skills/erp-kit-module-1-docs/SKILL.md +0 -111
  586. package/skills/erp-kit-module-2-feature-breakdown/SKILL.md +0 -76
  587. package/skills/erp-kit-module-3-doc-review/SKILL.md +0 -294
  588. package/skills/erp-kit-module-4-tdd/SKILL.md +0 -94
  589. package/skills/erp-kit-module-4-tdd/references/exports.md +0 -8
  590. package/skills/erp-kit-module-5-impl-review/SKILL.md +0 -410
  591. package/src/commands/scaffold-templates.ts +0 -65
  592. package/src/modules/shared/index.ts +0 -1
  593. package/src/modules/user-management/command/logAuditEvent.generated.ts +0 -6
  594. package/src/modules/user-management/command/logAuditEvent.test.ts +0 -187
  595. package/src/modules/user-management/command/logAuditEvent.ts +0 -56
  596. package/src/modules/user-management/db/auditEvent.ts +0 -47
  597. package/src/modules/user-management/docs/commands/LogAuditEvent.md +0 -37
  598. package/src/modules/user-management/docs/features/audit-trail.md +0 -80
  599. package/src/modules/user-management/docs/models/AuditEvent.md +0 -36
  600. /package/skills/{erp-kit-module-2-feature-breakdown → erp-kit-module-3-plan}/references/naming.md +0 -0
  601. /package/skills/{erp-kit-module-4-tdd → erp-kit-module-5-impl}/references/cross-module-dependency.md +0 -0
  602. /package/skills/{erp-kit-module-4-tdd → erp-kit-module-5-impl}/references/db-relations.md +0 -0
  603. /package/skills/{erp-kit-module-4-tdd → erp-kit-module-5-impl}/references/generated-code.md +0 -0
  604. /package/skills/{erp-kit-module-4-tdd → erp-kit-module-5-impl}/references/models.md +0 -0
  605. /package/skills/{erp-kit-module-5-impl-review → erp-kit-module-6-impl-review}/references/commands.md +0 -0
  606. /package/skills/{erp-kit-module-5-impl-review → erp-kit-module-6-impl-review}/references/testing.md +0 -0
  607. /package/src/modules/{product-management → audit}/.gitkeep +0 -0
  608. /package/src/{modules/shared → shared}/createContext.test.ts +0 -0
  609. /package/src/{modules/shared → shared}/createContext.ts +0 -0
  610. /package/src/{modules/shared → shared}/definePermissions.test.ts +0 -0
  611. /package/src/{modules/shared → shared}/definePermissions.ts +0 -0
  612. /package/src/{modules/shared → shared}/defineQuery.test.ts +0 -0
  613. /package/src/{modules/shared → shared}/defineQuery.ts +0 -0
  614. /package/src/{modules/shared → shared}/entityTypes.ts +0 -0
  615. /package/src/{modules/shared → shared}/errors.ts +0 -0
  616. /package/src/{modules/shared → shared}/requirePermission.test.ts +0 -0
  617. /package/src/{modules/shared → shared}/requirePermission.ts +0 -0
  618. /package/src/{modules/shared → shared}/result.ts +0 -0
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: erp-kit-module-1-requirements
3
+ description: Create ERP module requirements and feature documentation. Use when starting a new module, defining requirements, scoping features, or designing module architecture. Guides collaborative research, scoping, and iterative feature breakdown.
4
+ ---
5
+
6
+ # Module Requirements Workflow
7
+
8
+ Collaborative workflow for creating ERP module requirements. Uses parallel agents for research, then human validates and decides scope.
9
+
10
+ ## Workflow
11
+
12
+ ```
13
+ SETUP → DISPATCH AGENTS → AGGREGATE & SCOPE → CREATE → REVIEW
14
+ ```
15
+
16
+ ## Step 1: Setup
17
+
18
+ Define shared context for all agents:
19
+
20
+ - `MODULES_ROOT`: glob `**/modules/*/README.md` and derive the parent directory
21
+ - `MODULE_NAME`: from argument or detect from current working directory
22
+ - `DOMAIN`: the business domain (e.g., "inventory management", "purchasing")
23
+ - `OTHER_MODULES`: glob `<MODULES_ROOT>/*/README.md` (to understand existing module landscape)
24
+
25
+ Ask the user for the MODULE_NAME and DOMAIN if not provided.
26
+
27
+ ## Step 2: Dispatch Agents (parallelize if possible)
28
+
29
+ Launch 2 Agent tool calls in parallel — one per research concern.
30
+ Each agent receives: MODULE_NAME, DOMAIN, relevant context.
31
+
32
+ | Agent | Prompt Template | Inputs |
33
+ | ----- | ------------------------------------------------------------------ | ---------------------------------- |
34
+ | 1 | [references/erp-research.md](references/erp-research.md) | MODULE_NAME, DOMAIN |
35
+ | 2 | [references/boundary-analysis.md](references/boundary-analysis.md) | MODULE_NAME, DOMAIN, OTHER_MODULES |
36
+
37
+ For each agent:
38
+
39
+ 1. Read the prompt template file
40
+ 2. Replace `{{MODULE_NAME}}` with the resolved module name
41
+ 3. Replace `{{DOMAIN}}` with the business domain
42
+ 4. Replace `{{OTHER_MODULES}}` with the actual file paths
43
+ 5. Dispatch the agent with the filled prompt
44
+
45
+ ## Step 3: Aggregate & Scope Decision
46
+
47
+ After ALL agents return:
48
+
49
+ 1. Collect findings from each agent
50
+ 2. Build a **feature candidate table** by combining:
51
+ - Features identified from ERP/SaaS research (Agent 1)
52
+ - Module boundaries and dependencies (Agent 2)
53
+ 3. For each feature, assign Include/Skip and the reasoning
54
+
55
+ Present as a **feature candidate list**:
56
+
57
+ ### Feature Candidates
58
+
59
+ For each feature:
60
+
61
+ - **Feature:** feature name
62
+ - **Description:** what it does (1-2 sentences)
63
+ - **Recommendation:** `Include` or `Skip`
64
+ - **Why:** reasoning for the recommendation
65
+
66
+ Then ask the user: "推薦を変更したい機能はありますか?"
67
+
68
+ The final feature set becomes the union of all `Include` features. Iterate until the user approves.
69
+
70
+ ## Step 4: Create — Agent per feature
71
+
72
+ First, scaffold the module if it doesn't exist:
73
+
74
+ ```bash
75
+ erp-kit scaffold --modules-root <MODULES_ROOT> module <module-name>
76
+ ```
77
+
78
+ Then, for each `Include` feature, launch an Agent:
79
+
80
+ | Agent per feature | Prompt Template | Inputs |
81
+ | ----------------- | ------------------------------------------------------ | ---------------------------------------------------------------- |
82
+ | N | [references/feature-doc.md](references/feature-doc.md) | MODULE_NAME, FEATURE_NAME, FEATURE_DESCRIPTION, RESEARCH_CONTEXT |
83
+
84
+ - `FEATURE_NAME`: the feature name from the candidate list
85
+ - `FEATURE_SLUG`: kebab-case version (e.g., `role-based-access-control`)
86
+ - `FEATURE_DESCRIPTION`: the description from the candidate list
87
+ - `RESEARCH_CONTEXT`: relevant findings from Agent 1 (ERP/SaaS research) for this feature
88
+
89
+ Parallelize across all features.
90
+
91
+ After all agents complete, run validation:
92
+
93
+ ```bash
94
+ pnpm run module:doc:check
95
+ ```
96
+
97
+ ## Step 5: Review
98
+
99
+ User reviews generated feature docs and may request changes.
100
+
101
+ **Split detection**: If a feature covers multiple distinct workflows, split into separate feature files.
102
+
103
+ **Iteration pattern:**
104
+
105
+ 1. User identifies issue (e.g., "X is too broad, split it")
106
+ 2. Create new feature file for split-out content
107
+ 3. Remove split content from original file
108
+ 4. Update README.md feature list if needed
109
+
110
+ Continue iterating until user approves.
111
+
112
+ # Framework Schemas Reference
113
+
114
+ Schemas are bundled in `@tailor-platform/erp-kit`.
115
+
116
+ ## Validation
117
+
118
+ Always run before completing:
119
+
120
+ ```bash
121
+ pnpm run module:doc:check
122
+ ```
123
+
124
+ ## References
125
+
126
+ - [Module structure](../erp-kit-module-shared/references/structure.md)
@@ -0,0 +1,51 @@
1
+ # Module Boundary Analysis
2
+
3
+ ## Context
4
+
5
+ Module: {{MODULE_NAME}}
6
+ Domain: {{DOMAIN}}
7
+ Other module READMEs: {{OTHER_MODULES}}
8
+
9
+ ## Instructions
10
+
11
+ Analyze how the proposed {{MODULE_NAME}} module fits within the existing module landscape.
12
+
13
+ 1. Read ALL other module READMEs at the paths above
14
+ 2. For each existing module, extract:
15
+ - Module purpose and scope
16
+ - Key entities it owns
17
+ - Features it provides
18
+ 3. Analyze boundaries:
19
+ - What entities might be shared with existing modules?
20
+ - What dependencies will this module have on others?
21
+ - What dependencies might others have on this module?
22
+ - Are there potential scope overlaps?
23
+
24
+ ## Boundary Checks
25
+
26
+ | Check | Question |
27
+ | -------------------- | ------------------------------------------------------- |
28
+ | entity_ownership | Which entities are new vs shared with existing modules? |
29
+ | scope_overlap | Does this domain overlap with existing module scopes? |
30
+ | dependency_direction | What are the expected dependency directions? |
31
+ | integration_points | Where will this module need to integrate with others? |
32
+
33
+ ## Output Format
34
+
35
+ Return your analysis as a structured markdown report:
36
+
37
+ ### Existing Module Landscape
38
+
39
+ Table of existing modules with columns: Module, Relationship (none/depends_on/depended_by/overlaps), Detail
40
+
41
+ ### Shared Entities
42
+
43
+ Table with columns: Entity, Owned By, Referenced By
44
+
45
+ ### Boundary Concerns
46
+
47
+ Table with columns: Concern, Severity (high/medium/low), Recommendation
48
+
49
+ ### Integration Points
50
+
51
+ Table with columns: With Module, Type (data_reference/command_call/event), Description
@@ -0,0 +1,57 @@
1
+ # ERP Research
2
+
3
+ ## Context
4
+
5
+ Module: {{MODULE_NAME}}
6
+ Domain: {{DOMAIN}}
7
+
8
+ ## Instructions
9
+
10
+ Research established ERP solutions and leading domain-specific SaaS for the {{DOMAIN}} domain and compile findings.
11
+
12
+ 1. **Web search** established ERP platforms for the domain
13
+ - Search: "Odoo {{DOMAIN}} features"
14
+ - Search: "Oracle ERP Cloud {{DOMAIN}}"
15
+ - Search: "SAP {{DOMAIN}} module"
16
+ 2. **Web search** leading SaaS products in the {{DOMAIN}} domain
17
+ - Search: "best {{DOMAIN}} software" or "top {{DOMAIN}} SaaS"
18
+ - Identify 2-3 market-leading SaaS products specialized in this domain
19
+ - Research their core features, data models, and workflows
20
+ 3. **Fetch documentation** from official sources when available:
21
+ - Odoo: https://www.odoo.com/documentation/19.0/applications.html
22
+ - Oracle: https://docs.oracle.com/en/cloud/saas/index.html
23
+ - SAP: Search SAP Docs
24
+ - Domain SaaS: Fetch product documentation or feature pages
25
+ 4. **Identify** common features across solutions:
26
+ - Core entities and their attributes
27
+ - Common workflows and state machines
28
+ - Compliance requirements
29
+ - Integration points
30
+ 5. **Categorize** features by scope level:
31
+ - Minimal: Basic CRUD, core entities
32
+ - Core: Essential workflows, standard compliance
33
+ - Comprehensive: Advanced features, full compliance, integrations
34
+
35
+ ## Output Format
36
+
37
+ Return your findings as a structured markdown report:
38
+
39
+ ### Sources Consulted
40
+
41
+ List which ERP systems and domain SaaS products were researched.
42
+
43
+ ### Core Entities
44
+
45
+ Table of entities with columns: Entity, Description, Scope (minimal/core/comprehensive)
46
+
47
+ ### Common Features
48
+
49
+ Table of features with columns: Feature, Description, Scope, Found In
50
+
51
+ ### Workflows
52
+
53
+ For each workflow: name, description, and which scope level it belongs to.
54
+
55
+ ### Compliance Requirements
56
+
57
+ List any regulatory or compliance requirements found.
@@ -0,0 +1,61 @@
1
+ # Feature Documentation
2
+
3
+ ## Context
4
+
5
+ Module: {{MODULE_NAME}}
6
+ Feature: {{FEATURE_NAME}}
7
+ Feature description: {{FEATURE_DESCRIPTION}}
8
+ Research context: {{RESEARCH_CONTEXT}}
9
+
10
+ ## Instructions
11
+
12
+ Write a feature documentation file for the {{FEATURE_NAME}} feature.
13
+
14
+ 1. Read existing feature docs in `{{MODULES_ROOT}}/{{MODULE_NAME}}/docs/features/` for style reference
15
+ 2. Scaffold the file:
16
+ ```bash
17
+ erp-kit scaffold --modules-root {{MODULES_ROOT}} feature {{MODULE_NAME}} {{FEATURE_SLUG}}
18
+ ```
19
+ 3. Fill in the scaffolded file following the structure below
20
+
21
+ ## Feature Doc Structure
22
+
23
+ ### Overview
24
+
25
+ 1-2 paragraphs explaining what the feature does and why it exists.
26
+
27
+ ### Business Purpose
28
+
29
+ Bulleted list of business needs this feature addresses.
30
+
31
+ ### Process Flow
32
+
33
+ Mermaid flowchart showing the main workflow. Use `flowchart TD` format.
34
+
35
+ ### Scenario Patterns
36
+
37
+ Bulleted list of concrete usage scenarios. Each pattern:
38
+
39
+ - **Pattern name**: Brief description of when/how this scenario occurs
40
+
41
+ ### Test Cases
42
+
43
+ Bulleted list of testable assertions. Each test case should be a single sentence starting with a verb or condition:
44
+
45
+ - "Creating X with valid data should succeed"
46
+ - "X must be unique (no duplicates)"
47
+ - "Deactivating X while Y should be prevented"
48
+
49
+ Cover: happy paths, uniqueness/validation, authorization, edge cases.
50
+
51
+ ### Reference Links (optional)
52
+
53
+ Links to relevant standards, specs, or external documentation.
54
+
55
+ ## Guidelines
56
+
57
+ - Keep the overview concise (~100-200 words)
58
+ - Scenario patterns should reflect real business use cases, not implementation details
59
+ - Test cases should be verifiable from the feature spec alone (no implementation knowledge needed)
60
+ - Use the research context to inform realistic scenarios and edge cases
61
+ - Do not reference other features' internal details; describe integration points at a high level
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: erp-kit-module-2-requirements-review
3
+ description: Review requirements quality and module boundary consistency. Use after creating requirements (step 1) to validate best practices and cross-module boundaries.
4
+ ---
5
+
6
+ # Requirements Review
7
+
8
+ Review **requirements quality** and **module boundary consistency** for a module.
9
+
10
+ ## When to Use
11
+
12
+ - After writing module requirements and feature documentation (step 1)
13
+ - When validating that features follow ERP best practices
14
+ - When checking module boundaries against existing modules
15
+
16
+ ## Step 1: Setup
17
+
18
+ Define shared context for all agents:
19
+
20
+ - `MODULES_ROOT`: glob `**/modules/*/README.md` and derive the parent directory
21
+ - `MODULE_NAME`: from argument or detect from current working directory
22
+ - `MODULE_README`: `<MODULES_ROOT>/<MODULE_NAME>/README.md`
23
+ - `FEATURE_DOCS`: glob `<MODULES_ROOT>/<MODULE_NAME>/docs/features/*.md`
24
+ - `OTHER_MODULES`: glob `<MODULES_ROOT>/*/README.md` (excluding current module)
25
+ - `OTHER_FEATURES`: glob `<MODULES_ROOT>/*/docs/features/*.md` (excluding current module)
26
+
27
+ Verify at least `MODULE_README` exists. If not, stop with: "No module README found for module <MODULE_NAME>. Run erp-kit-module-1-requirements first."
28
+
29
+ ## Step 2: Dispatch Agents (parallelize if possible)
30
+
31
+ Launch 2 Agent tool calls in parallel — one per review concern.
32
+ Each agent receives: MODULE_NAME, relevant doc file paths.
33
+ Each agent returns: structured markdown per [references/requirements-report-format.md](references/requirements-report-format.md).
34
+
35
+ | Agent | Prompt Template | Inputs |
36
+ | ----- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
37
+ | 1 | [references/best-practices-check.md](references/best-practices-check.md) | MODULE_README, FEATURE_DOCS |
38
+ | 2 | [references/boundary-consistency-check.md](references/boundary-consistency-check.md) | MODULE_README, FEATURE_DOCS, OTHER_MODULES, OTHER_FEATURES |
39
+
40
+ For each agent:
41
+
42
+ 1. Read the prompt template file
43
+ 2. Replace `{{MODULE_NAME}}` with the resolved module name
44
+ 3. Replace `{{MODULE_README}}`, `{{FEATURE_DOCS}}`, `{{OTHER_MODULES}}`, `{{OTHER_FEATURES}}` with the actual file paths
45
+ 4. Dispatch the agent with the filled prompt
46
+
47
+ ## Step 3: Aggregate Results
48
+
49
+ After ALL agents return:
50
+
51
+ 1. Collect the markdown results from each agent
52
+ 2. Merge all `issues[]` arrays into a single list
53
+ 3. Merge all `recommendations[]` arrays into a single list
54
+ 4. Calculate totals across all summaries
55
+ 5. Render the final report below
56
+
57
+ ## Report Format
58
+
59
+ Render the aggregated results as markdown:
60
+
61
+ ### Requirements Review Report
62
+
63
+ **Module:** <MODULE_NAME>
64
+
65
+ ---
66
+
67
+ ### 1. Best Practices
68
+
69
+ | Feature | Check | Status | Detail |
70
+ | ------- | ----- | ------ | ------ |
71
+
72
+ (Populated from agent 1 issues)
73
+
74
+ ---
75
+
76
+ ### 2. Module Boundary Consistency
77
+
78
+ | Feature | Overlapping Module | Overlap Area | Recommendation |
79
+ | ------- | ------------------ | ------------ | -------------- |
80
+
81
+ (Populated from agent 2 issues where check is `boundary_overlap`)
82
+
83
+ ---
84
+
85
+ ### 3. Dependency Analysis
86
+
87
+ | Feature | Depends On Module | Dependency Type | Status |
88
+ | ------- | ----------------- | --------------- | ------ |
89
+
90
+ (Populated from agent 2 issues where check is `dependency_analysis`)
91
+
92
+ ---
93
+
94
+ ### 4. Summary
95
+
96
+ | Aspect | Status | Details |
97
+ | -------------------- | ------ | ----------------- |
98
+ | Best Practices | | X/Y checks passed |
99
+ | Boundary Consistency | | X/Y checks passed |
100
+
101
+ ### 5. Recommendations
102
+
103
+ Numbered list of actionable fixes, grouped by priority:
104
+
105
+ 1. Critical boundary issues (highest priority)
106
+ 2. Best practice violations
107
+ 3. Improvement suggestions
108
+
109
+ ## References
110
+
111
+ - [Requirements report format](references/requirements-report-format.md)
112
+ - For requirements creation, see erp-kit-module-1-requirements
@@ -0,0 +1,79 @@
1
+ # Domain Best Practices Check
2
+
3
+ ## Context
4
+
5
+ Module: {{MODULE_NAME}}
6
+ Module README: {{MODULE_README}}
7
+ Feature docs: {{FEATURE_DOCS}}
8
+
9
+ ## Instructions
10
+
11
+ 1. Read the module README at the path above
12
+ 2. Read ALL feature docs at the paths above
13
+ 3. **Web search** established ERP systems (Odoo, SAP, Oracle) and leading domain SaaS for this module's domain to understand industry-standard patterns
14
+ 4. For each feature, evaluate whether the **domain design itself** follows industry best practices
15
+ 5. Return results as markdown per the Output Format section
16
+
17
+ ## Domain Design Checks
18
+
19
+ For each feature doc, evaluate the design decisions against ERP/SaaS industry norms:
20
+
21
+ | Check ID | Question |
22
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------- |
23
+ | entity_design | Does the entity model follow industry-standard patterns? (e.g., Person/Organization split, address normalization) |
24
+ | state_machine_design | Do state transitions match how this domain typically works in production ERP systems? |
25
+ | business_rules_validity | Are the business rules realistic and aligned with real-world domain constraints? |
26
+ | missing_capabilities | Are there standard domain capabilities that are conspicuously absent? |
27
+ | over_engineering | Are there features or rules that go beyond what's standard and add unnecessary complexity? |
28
+ | compliance_alignment | Does the design account for relevant industry standards or regulations? (e.g., ISO, tax law) |
29
+
30
+ ### Module-Level Checks
31
+
32
+ | Check ID | Question |
33
+ | --------------------- | ------------------------------------------------------------------------------------------ |
34
+ | domain_model_fit | Does the module's entity decomposition match how this domain is typically modeled in ERPs? |
35
+ | integration_readiness | Are the integration points (what other modules will need) well-anticipated? |
36
+
37
+ ## How to Check
38
+
39
+ For each feature:
40
+
41
+ 1. Identify the domain area (e.g., partner management, inventory, purchasing)
42
+ 2. Research how Odoo, SAP, Oracle, and leading SaaS products design this domain area
43
+ 3. Compare the feature's entity model, state transitions, and business rules against industry patterns
44
+ 4. Flag deviations — some deviations are intentional simplifications (acceptable), others are design gaps (flag them)
45
+
46
+ ## Common Domain Design Issues
47
+
48
+ - **Missing standard entity splits**: e.g., not distinguishing Person vs Organization in partner management
49
+ - **Non-standard state machines**: e.g., missing common states like "Draft" or "Pending Approval" that most ERPs include
50
+ - **Unrealistic business rules**: e.g., rules that would break in multi-currency or multi-tenant scenarios
51
+ - **Missing regulatory hooks**: e.g., tax handling that doesn't account for regional variations
52
+ - **Over-simplified relationships**: e.g., 1-1 where industry standard is N-N (e.g., contacts to organizations)
53
+
54
+ ## Output Format
55
+
56
+ Return your findings as a structured markdown report:
57
+
58
+ ### Check Results
59
+
60
+ For each finding:
61
+
62
+ - **Feature:** feature name
63
+ - **Check:** check ID
64
+ - **Status:** pass / fail / warn
65
+ - **Detail:** what was found and why it matters
66
+ - **Industry reference:** what Odoo/SAP/Oracle/SaaS does differently (if applicable)
67
+
68
+ ### Recommendations
69
+
70
+ Numbered list grouped by priority (critical → high → medium → low). Each item should reference a specific industry practice and explain the recommended change.
71
+
72
+ ### Summary
73
+
74
+ Table with columns: Metric, Count
75
+
76
+ - Total checks
77
+ - Passed
78
+ - Failed
79
+ - Warned
@@ -0,0 +1,70 @@
1
+ # Boundary Consistency Check
2
+
3
+ ## Context
4
+
5
+ Module: {{MODULE_NAME}}
6
+ Module README: {{MODULE_README}}
7
+ Feature docs: {{FEATURE_DOCS}}
8
+ Other module READMEs: {{OTHER_MODULES}}
9
+ Other module features: {{OTHER_FEATURES}}
10
+
11
+ ## Instructions
12
+
13
+ 1. Read the module README and ALL feature docs for {{MODULE_NAME}}
14
+ 2. Read ALL other module READMEs and their feature docs
15
+ 3. For each feature in {{MODULE_NAME}}, check for boundary overlaps and dependency issues
16
+ 4. Return results as markdown per the Output Format section
17
+
18
+ ## Boundary Checks
19
+
20
+ For each feature in the target module:
21
+
22
+ | Check ID | Question |
23
+ | ------------------- | ------------------------------------------------------------------------- |
24
+ | boundary_overlap | Does this feature overlap with features in other modules? |
25
+ | entity_ownership | Is each entity owned by exactly one module? No shared entity definitions? |
26
+ | dependency_analysis | Are cross-module dependencies explicit and well-defined? |
27
+ | scope_leakage | Does this feature handle concerns that belong to another module? |
28
+
29
+ ### How to Check
30
+
31
+ 1. Extract all entities and operations from the target module's features
32
+ 2. Extract all entities and operations from other modules' features
33
+ 3. Compare for overlaps:
34
+ - Same entity name in multiple modules → likely boundary issue
35
+ - Same operation on same entity → scope leakage
36
+ - Feature referencing another module's entities without explicit dependency → implicit dependency
37
+ 4. For each overlap, determine if it's:
38
+ - **Legitimate shared reference** (e.g., User entity referenced by many modules)
39
+ - **Boundary violation** (e.g., both modules try to manage the same entity lifecycle)
40
+ - **Missing dependency** (e.g., module uses entity without declaring dependency)
41
+
42
+ ## Common Boundary Patterns
43
+
44
+ - **Ownership conflicts**: Two modules both define CRUD for the same entity
45
+ - **Scope creep**: Module handles validation/workflow that belongs elsewhere
46
+ - **Missing integration points**: Module needs data from another module but doesn't declare it
47
+ - **Redundant features**: Same capability implemented in multiple modules
48
+
49
+ ## Output Format
50
+
51
+ Return your findings as a structured markdown report:
52
+
53
+ ### Check Results
54
+
55
+ Table with columns: Feature, Target (overlapping module/feature), Check, Status (pass/fail/warn), Detail
56
+
57
+ One row per check performed.
58
+
59
+ ### Recommendations
60
+
61
+ Numbered list grouped by priority (critical → high → medium → low). Each item is an actionable recommendation.
62
+
63
+ ### Summary
64
+
65
+ Table with columns: Metric, Count
66
+
67
+ - Total checks
68
+ - Passed
69
+ - Failed
70
+ - Warned
@@ -0,0 +1,25 @@
1
+ # Requirements Report Format
2
+
3
+ All requirements review agents return results as structured markdown.
4
+
5
+ ## Expected Sections
6
+
7
+ ### Check Results
8
+
9
+ A table with one row per check performed. Columns vary by agent type but always include:
10
+
11
+ - **Status**: `pass` (no issues), `fail` (significant issue), or `warn` (minor concern)
12
+ - **Detail**: Human-readable description of the finding
13
+
14
+ ### Recommendations
15
+
16
+ A numbered list of actionable suggestions, grouped by priority:
17
+
18
+ - **critical**: must fix before proceeding to implementation planning
19
+ - **high**: should fix, may cause issues downstream
20
+ - **medium**: recommended improvement
21
+ - **low**: nice to have
22
+
23
+ ### Summary
24
+
25
+ A summary table with aggregate counts: total checks, passed, failed, warned.