@autobe/agent 0.30.4 → 0.30.5

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 (210) hide show
  1. package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -4
  2. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  3. package/lib/describe/image/orchestrateImageDescribeDraft.js +6 -6
  4. package/lib/describe/image/structures/IAutoBeImageDescribeDraftApplication.d.ts +12 -63
  5. package/lib/index.mjs +2918 -2842
  6. package/lib/index.mjs.map +1 -1
  7. package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js +8 -8
  8. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +36 -37
  9. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  10. package/lib/orchestrate/analyze/orchestrateAnalyzeScenarioReview.js +7 -7
  11. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js +55 -42
  12. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js.map +1 -1
  13. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js +67 -54
  14. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js.map +1 -1
  15. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js +24 -25
  16. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js.map +1 -1
  17. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js +24 -25
  18. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js.map +1 -1
  19. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js +30 -31
  20. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js.map +1 -1
  21. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.d.ts +14 -52
  22. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +23 -96
  23. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.d.ts +12 -40
  24. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.d.ts +30 -88
  25. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.d.ts +35 -94
  26. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.d.ts +23 -93
  27. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.d.ts +15 -88
  28. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js +76 -31
  29. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -1
  30. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +7 -7
  31. package/lib/orchestrate/common/structures/IAnalysisSectionEntry.d.ts +2 -8
  32. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +8 -50
  33. package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +1 -9
  34. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.d.ts +4 -23
  35. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.d.ts +3 -21
  36. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +4 -22
  37. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +4 -22
  38. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.d.ts +5 -17
  39. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.d.ts +7 -76
  40. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.d.ts +6 -89
  41. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.d.ts +7 -93
  42. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.d.ts +3 -22
  43. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.d.ts +3 -22
  44. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js +114 -139
  45. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -1
  46. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +90 -91
  47. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -1
  48. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js +58 -59
  49. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js.map +1 -1
  50. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +58 -59
  51. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -1
  52. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js +108 -132
  53. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -1
  54. package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js +72 -72
  55. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +76 -77
  56. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -1
  57. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js +130 -159
  58. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js.map +1 -1
  59. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js +126 -155
  60. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js.map +1 -1
  61. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js +114 -142
  62. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js.map +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +5 -5
  64. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +100 -129
  65. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  66. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js +120 -149
  67. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js.map +1 -1
  68. package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.d.ts +10 -97
  69. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +14 -83
  70. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.d.ts +12 -90
  71. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +12 -80
  72. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +21 -116
  73. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.d.ts +24 -112
  74. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +11 -83
  75. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +11 -76
  76. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.d.ts +18 -96
  77. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.d.ts +11 -76
  78. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.d.ts +25 -107
  79. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +5 -31
  80. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.d.ts +6 -42
  81. package/lib/orchestrate/prisma/orchestratePrismaAuthorization.js +41 -41
  82. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js +62 -63
  83. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js.map +1 -1
  84. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +40 -41
  85. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  86. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js +60 -61
  87. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js.map +1 -1
  88. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +112 -116
  89. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  90. package/lib/orchestrate/prisma/orchestratePrismaGroup.js +48 -49
  91. package/lib/orchestrate/prisma/orchestratePrismaGroup.js.map +1 -1
  92. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js +70 -71
  93. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js.map +1 -1
  94. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +118 -122
  95. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  96. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js +126 -131
  97. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js.map +1 -1
  98. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.d.ts +22 -99
  99. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.d.ts +12 -109
  100. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.d.ts +14 -100
  101. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.d.ts +15 -108
  102. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.d.ts +24 -106
  103. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.d.ts +13 -76
  104. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.d.ts +13 -111
  105. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.d.ts +26 -97
  106. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.d.ts +16 -93
  107. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js +1 -1
  108. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js.map +1 -1
  109. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js +1 -1
  110. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js.map +1 -1
  111. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js +20 -2
  112. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js.map +1 -1
  113. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js +22 -2
  114. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js.map +1 -1
  115. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectCasting.js +7 -7
  116. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js +86 -6
  117. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js.map +1 -1
  118. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +38 -38
  119. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +34 -34
  120. package/lib/orchestrate/realize/orchestrateRealizeCollectorCorrectOverall.js +38 -38
  121. package/lib/orchestrate/realize/orchestrateRealizeCollectorPlan.js +54 -54
  122. package/lib/orchestrate/realize/orchestrateRealizeCollectorWrite.js +36 -36
  123. package/lib/orchestrate/realize/orchestrateRealizeOperationCorrectOverall.js +44 -44
  124. package/lib/orchestrate/realize/orchestrateRealizeOperationWrite.js +42 -42
  125. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js +1 -0
  126. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js.map +1 -1
  127. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectOverall.js +46 -46
  128. package/lib/orchestrate/realize/orchestrateRealizeTransformerPlan.js +36 -36
  129. package/lib/orchestrate/realize/orchestrateRealizeTransformerWrite.js +44 -44
  130. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.d.ts +18 -0
  131. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js +167 -8
  132. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js.map +1 -1
  133. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +17 -71
  134. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.d.ts +32 -92
  135. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.d.ts +32 -114
  136. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.d.ts +29 -106
  137. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.d.ts +38 -131
  138. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.d.ts +16 -71
  139. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.d.ts +16 -73
  140. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.d.ts +37 -155
  141. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.d.ts +25 -88
  142. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.d.ts +48 -181
  143. package/lib/orchestrate/realize/utils/generateTS2339Hints.d.ts +5 -3
  144. package/lib/orchestrate/realize/utils/generateTS2339Hints.js +37 -19
  145. package/lib/orchestrate/realize/utils/generateTS2339Hints.js.map +1 -1
  146. package/lib/orchestrate/test/histories/transformTestOperationWriteHistory.js +2 -2
  147. package/lib/orchestrate/test/orchestrateTestScenario.js +22 -22
  148. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +22 -22
  149. package/package.json +5 -5
  150. package/src/constants/AutoBeSystemPromptConstant.ts +5 -4
  151. package/src/describe/image/structures/IAutoBeImageDescribeDraftApplication.ts +12 -63
  152. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.ts +14 -52
  153. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +23 -96
  154. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.ts +12 -40
  155. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.ts +30 -88
  156. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.ts +35 -94
  157. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.ts +23 -93
  158. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.ts +15 -88
  159. package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.ts +92 -31
  160. package/src/orchestrate/common/structures/IAnalysisSectionEntry.ts +2 -8
  161. package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +8 -50
  162. package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +1 -9
  163. package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.ts +4 -23
  164. package/src/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.ts +3 -21
  165. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +4 -22
  166. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +4 -22
  167. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.ts +5 -17
  168. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.ts +7 -76
  169. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.ts +6 -89
  170. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.ts +7 -93
  171. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.ts +3 -22
  172. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.ts +3 -22
  173. package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.ts +10 -97
  174. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +14 -83
  175. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.ts +12 -90
  176. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +12 -80
  177. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +21 -116
  178. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.ts +24 -112
  179. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +11 -83
  180. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +11 -76
  181. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.ts +18 -96
  182. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.ts +11 -76
  183. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.ts +25 -107
  184. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +5 -31
  185. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.ts +6 -42
  186. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.ts +22 -99
  187. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.ts +12 -109
  188. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.ts +14 -100
  189. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.ts +15 -108
  190. package/src/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.ts +24 -106
  191. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.ts +13 -76
  192. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.ts +13 -111
  193. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.ts +26 -97
  194. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.ts +16 -93
  195. package/src/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.ts +21 -1
  196. package/src/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.ts +26 -4
  197. package/src/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.ts +125 -9
  198. package/src/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.ts +1 -0
  199. package/src/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.ts +210 -7
  200. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +17 -71
  201. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.ts +32 -92
  202. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.ts +32 -114
  203. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.ts +29 -106
  204. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.ts +38 -131
  205. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.ts +16 -71
  206. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.ts +16 -73
  207. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.ts +37 -155
  208. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.ts +25 -88
  209. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.ts +48 -181
  210. package/src/orchestrate/realize/utils/generateTS2339Hints.ts +39 -19
@@ -113,7 +113,7 @@ function process(ctx, props) {
113
113
  properties: {
114
114
  thinking: {
115
115
  type: "string",
116
- description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on\nyour current state and explain your reasoning:\n\nFor preliminary requests (getAnalysisSections, getDatabaseSchemas, etc.):\n\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature\ncompletion."
116
+ description: "Think before you act.\n\nFor preliminary requests: what critical information is missing and why?\nBe brief \u2014 state the gap, don't list everything you have.\n\nFor completion: what key assets did you acquire, what did you accomplish,\nwhy is it sufficient? Summarize \u2014 don't enumerate every single item."
117
117
  },
118
118
  request: {
119
119
  oneOf: [
@@ -139,7 +139,7 @@ function process(ctx, props) {
139
139
  complete: "#/components/schemas/IAutoBeDatabaseSchemaApplication.IComplete"
140
140
  }
141
141
  },
142
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisSections, getPreviousAnalysisSections,\ngetPreviousDatabaseSchemas) or final schema generation (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls."
142
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls."
143
143
  }
144
144
  },
145
145
  required: [
@@ -152,7 +152,7 @@ function process(ctx, props) {
152
152
  properties: {
153
153
  type: {
154
154
  "const": "getPreviousAnalysisSections",
155
- description: "Type discriminator for the request.\n\nValue \"getPreviousAnalysisSections\" indicates this is a preliminary data\nrequest for analysis sections from the previous iteration."
155
+ description: "Type discriminator."
156
156
  },
157
157
  sectionIds: {
158
158
  type: "array",
@@ -161,21 +161,21 @@ function process(ctx, props) {
161
161
  minimum: 0
162
162
  },
163
163
  minItems: 1,
164
- description: "List of section IDs to retrieve from the previous iteration.\n\nCRITICAL: DO NOT request the same section IDs that you have already\nrequested in previous calls."
164
+ description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls."
165
165
  }
166
166
  },
167
167
  required: [
168
168
  "type",
169
169
  "sectionIds"
170
170
  ],
171
- description: "Request to retrieve individual analysis sections from previous iteration by\nnumeric ID.\n\nSame as {@link IAutoBePreliminaryGetAnalysisSections} but for sections from\nthe previous generation cycle, enabling comparison and consistency checks."
171
+ description: "Request to retrieve analysis sections from the previous iteration by numeric\nID."
172
172
  },
173
173
  IAutoBePreliminaryGetAnalysisSections: {
174
174
  type: "object",
175
175
  properties: {
176
176
  type: {
177
177
  "const": "getAnalysisSections",
178
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisSections\" indicates this is a preliminary\ndata request for individual analysis sections."
178
+ description: "Type discriminator."
179
179
  },
180
180
  sectionIds: {
181
181
  type: "array",
@@ -185,21 +185,21 @@ function process(ctx, props) {
185
185
  },
186
186
  minItems: 1,
187
187
  maxItems: 100,
188
- description: "List of section IDs to retrieve.\n\nThese are sequential integer IDs from the analysis sections catalog. Each\nID maps to a specific ### section in the requirements documents.\n\nCRITICAL: DO NOT request the same section IDs that you have already\nrequested in previous calls."
188
+ description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls."
189
189
  }
190
190
  },
191
191
  required: [
192
192
  "type",
193
193
  "sectionIds"
194
194
  ],
195
- description: "Request to retrieve individual analysis sections by numeric ID.\n\nInstead of loading entire analysis files (~110-120KB each), this loads\nspecific ### sections (~200-600 words each) identified by integer IDs from\nthe section catalog."
195
+ description: "Request to retrieve individual analysis sections by numeric ID."
196
196
  },
197
197
  IAutoBePreliminaryGetPreviousDatabaseSchemas: {
198
198
  type: "object",
199
199
  properties: {
200
200
  type: {
201
201
  "const": "getPreviousDatabaseSchemas",
202
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getPreviousDatabaseSchemas\" indicates this is a\npreliminary data request for database schemas from a previous version."
202
+ description: "Type discriminator."
203
203
  },
204
204
  schemaNames: {
205
205
  type: "array",
@@ -207,29 +207,29 @@ function process(ctx, props) {
207
207
  type: "string"
208
208
  },
209
209
  minItems: 1,
210
- description: "List of database table names to retrieve from the previous version.\n\nThese are table schema names that were generated in a previous version and\nare needed as reference context for the current regeneration.\n\n**Important Notes:**\n\n- These schemas MUST exist in the previous version\n- This function is only available when a previous version exists\n- Used for reference/comparison, not for re-requesting within same execution\n- Table names are in snake_case (e.g., \"shopping_sale\", \"bbs_article\")\n\n**When This Function is Available:**\n\n- When a previous version exists\n- When user requests modifications to existing database schema\n- During correction/regeneration cycles that need previous schema context\n\n**When This Function is NOT Available:**\n\n- During initial generation (no previous version exists)\n- No previous database schemas available for this orchestration task\n\n**Example Table Names:**\n\n- \"users\", \"posts\", \"comments\"\n- \"shopping_sales\", \"shopping_orders\", \"shopping_products\"\n- \"bbs_articles\", \"bbs_article_files\""
210
+ description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls."
211
211
  }
212
212
  },
213
213
  required: [
214
214
  "type",
215
215
  "schemaNames"
216
216
  ],
217
- description: "Request to retrieve database schemas from a previous version.\n\nThis type is used to load database schema definitions that were generated in\na **previous version** of the AutoBE generation pipeline. This is NOT about\nre-requesting schemas within the same execution, but rather accessing\nartifacts from an earlier version.\n\n**Use Case:** When regenerating or modifying the database schema based on\nuser change requests, agents need to reference the previously generated\ndatabase schemas to understand the existing database structure and what needs\nto be modified.\n\n**Key Difference from `getDatabaseSchemas`:**\n\n- `getDatabaseSchemas`: Fetches schemas from the **current version** (the\n version being generated right now)\n- `getPreviousDatabaseSchemas`: Fetches schemas from the **previous version**\n (the last successfully generated version)\n\n**Example Scenario:**\n\n Initial generation:\n - DATABASE phase creates: users, posts, comments tables\n - Generation completes successfully\n\n User: \"Add email verification status to users\"\n\n Regeneration:\n - DATABASE phase starts regeneration\n - Calls getPreviousDatabaseSchemas([\"users\"])\n \u2192 Loads the previous version of users table schema\n - Creates new version with emailVerified field added\n\n**Waterfall + Spiral Pattern:**\n\nThis aligns with AutoBE's regeneration cycles where:\n\n- Compilation failures trigger regeneration with corrections\n- User modifications trigger new versions\n- Previous schemas serve as reference for incremental changes"
217
+ description: "Request to retrieve database schemas from the previous iteration.\n\nLoads database table definitions from the last successfully generated\nversion, used as reference context during regeneration or modification\ncycles."
218
218
  },
219
219
  "IAutoBeDatabaseSchemaApplication.IComplete": {
220
220
  type: "object",
221
221
  properties: {
222
222
  type: {
223
223
  "const": "complete",
224
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request."
224
+ description: "Type discriminator for completion request."
225
225
  },
226
226
  plan: {
227
227
  type: "string",
228
- description: "Strategic database design analysis and planning.\n\nContains the database architecture strategy for the target table and any\nchild tables needed for First Normal Form (1NF) compliance, including\nstructure, relationships, normalization approach, indexing strategies,\nand business requirement mapping. This planning phase defines the\nblueprint for the model implementations.\n\nKey planning aspects:\n\n- Assignment validation: Extract targetTable as the assignment\n- Target table: The primary table matching targetTable is mandatory\n- Child tables: Additional tables to decompose repeating groups or\n non-atomic values into separate normalized tables (1NF compliance)\n- Child table naming: Must use singular form of targetTable as prefix\n (e.g., for \"shopping_orders\": \"shopping_order_items\")\n- Other tables: Identify existing tables from otherComponents for foreign\n key relationships \u2014 never recreate them\n- Normalization: Strict adherence to 1NF, 2NF, 3NF principles\n- Snapshot architecture: Design for historical data preservation\n- Junction tables: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- Materialized views: Identify needs for mv_ prefixed denormalized tables"
228
+ description: "Database design plan for the target table and any child tables (1NF\ndecomposition).\n\nChild table naming: singular form of targetTable as prefix (e.g.,\n\"shopping_order_items\"). Never recreate existing tables from\notherComponents. Strict 1NF/2NF/3NF adherence. Junction tables:\n{table1}_{table2}. Materialized views: mv_ prefix."
229
229
  },
230
230
  definition: {
231
231
  $ref: "#/components/schemas/AutoBeDatabaseSchemaDefinition",
232
- description: "Schema definition containing the single target table model and any newly\ndiscovered table designs.\n\nThe definition carries exactly one\n{@link AutoBeDatabaseSchemaDefinition.model} \u2014 the target table assigned\nto this call \u2014 so that the output stays within the LLM's maximum output\ntoken limit. If normalization (e.g. 1NF decomposition) requires\nadditional child tables, declare them in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as lightweight name +\ndescription pairs; they will be generated by their own dedicated pipeline\ncalls.\n\nModel implementation requirements:\n\n- Primary keys: Always UUID type with field name \"id\"\n- Foreign keys: Proper IRelation configurations for all relationships\n- Business fields: Only raw data fields - no calculated or derived values\n- Data types: Limited to uuid, string, int, double, datetime, boolean, uri\n- Relationships: Correct patterns for 1:1, 1:N, and M:N\n- Indexes:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK)\n - GinIndexes: Full-text search on appropriate string fields\n- Materialized views: Tables prefixed with \"mv_\" have material flag set\n- Documentation: Comprehensive English descriptions with business context\n\nQuality standards:\n\n- Strict adherence to 3NF (Third Normal Form)\n- No denormalization except in materialized views (mv_ tables)\n- All foreign keys reference valid existing tables\n- Consistent created_at, updated_at, deleted_at patterns\n- Proper historical data preservation where needed\n- Optimized index strategy for expected query patterns"
232
+ description: "Schema definition with exactly one\n{@link AutoBeDatabaseSchemaDefinition.model} (the target table).\nAdditional child tables go in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as name + description\npairs.\n\nKey rules: UUID \"id\" primary keys, data types limited to\nuuid/string/int/double/ datetime/boolean/uri, no derived values, strict\n3NF, mv_ prefix for materialized views, consistent\ncreated_at/updated_at/deleted_at, PlainIndexes never single FK."
233
233
  }
234
234
  },
235
235
  required: [
@@ -237,28 +237,28 @@ function process(ctx, props) {
237
237
  "plan",
238
238
  "definition"
239
239
  ],
240
- description: "Request to generate database schema models.\n\nExecutes schema generation to create production-ready database models\nfollowing normalization principles, relationship patterns, and indexing\nstrategies."
240
+ description: "Generate production-ready database schema models with normalization and\nindexing."
241
241
  },
242
242
  AutoBeDatabaseSchemaDefinition: {
243
243
  type: "object",
244
244
  properties: {
245
245
  model: {
246
246
  $ref: "#/components/schemas/AutoBeDatabase.IModel",
247
- description: "The single database table model produced by this call.\n\nAlways represents the target table that was assigned to the agent. Limiting\nthe output to one model prevents the response from exceeding the LLM's\nmaximum output token budget."
247
+ description: "The single database table model produced by this call."
248
248
  },
249
249
  newDesigns: {
250
250
  type: "array",
251
251
  items: {
252
252
  $ref: "#/components/schemas/AutoBeDatabaseComponentTableDesign"
253
253
  },
254
- description: "Lightweight designs for additional tables discovered during generation or\nreview.\n\nWhen the agent determines that 1NF decomposition or other normalization\nrequires child tables that do not yet exist, it declares them here as\nname+description pairs rather than full model definitions.\n\nThese designs are fed back into the schema generation pipeline so that each\nnew table is produced by its own dedicated call."
254
+ description: "Name+description pairs for child tables discovered during generation (1NF\ndecomposition, junction tables, etc.). Each feeds back into the pipeline as\na separate generation call."
255
255
  }
256
256
  },
257
257
  required: [
258
258
  "model",
259
259
  "newDesigns"
260
260
  ],
261
- description: "Database schema definition produced by a single schema generation or review\ncall.\n\nEach AI function call outputs exactly one target table model together with a\nlist of newly discovered table designs. The single-model constraint keeps the\noutput payload small enough to fit within the LLM's maximum output token\nlimit, while `newDesigns` lets the agent declare additional tables that\nshould be generated in subsequent calls through the normal pipeline."
261
+ description: "Output of a single schema generation or review call.\n\nOne target table model + lightweight designs for newly discovered child\ntables. Single-model constraint keeps output within LLM token budget."
262
262
  },
263
263
  "AutoBeDatabase.IModel": {
264
264
  type: "object",
@@ -266,15 +266,15 @@ function process(ctx, props) {
266
266
  name: {
267
267
  type: "string",
268
268
  pattern: "^[a-z][a-z0-9_]*$",
269
- description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\""
269
+ description: "MUST use snake_case. Materialized views use \"mv_\" prefix."
270
270
  },
271
271
  description: {
272
272
  type: "string",
273
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\""
273
+ description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax."
274
274
  },
275
275
  material: {
276
276
  type: "boolean",
277
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices"
277
+ description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix."
278
278
  },
279
279
  stance: {
280
280
  oneOf: [
@@ -294,46 +294,46 @@ function process(ctx, props) {
294
294
  "const": "session"
295
295
  }
296
296
  ],
297
- description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"actor\"` - Authenticated Actor Entity\n\nTables that represent a true actor in the system (a distinct user type\nwith its own authentication flow, table schema, and business logic).\nActor tables are the canonical identity records used across the system,\nand their sessions are recorded in a separate session table.\n\n**Key principle**: If the user type requires a distinct table and\nauthentication flow (not just an attribute), the table is an actor.\n\n**Characteristics:**\n\n- Serves as the primary identity record for that actor type\n- Owns credentials and actor-specific profile data\n- Has one-to-many sessions stored in a dedicated session table\n- Used as the root of permission and ownership relationships\n\n**Examples:**\n\n- `users` - Standard application users with authentication\n- `shopping_customers` - Customers with login and purchase history\n- `shopping_sellers` - Sellers with business credentials\n- `administrators` - Admins with elevated permissions\n\n### `\"session\"` - Actor Session Entity\n\nTables that represent login sessions for a specific actor. A session\ntable always belongs to exactly one actor type and contains connection\ncontext and temporal fields for auditing.\n\n**Key principle**: A session table exists only to track actor logins and\nmust reference exactly one actor table.\n\n**Characteristics:**\n\n- Child of a single actor table (many sessions per actor)\n- Stores connection metadata (IP, headers, referrer)\n- Append-only audit trail of login events\n- Managed through authentication flows, not direct user CRUD\n\n**Examples:**\n\n- `user_sessions` - Sessions for `users`\n- `shopping_customer_sessions` - Sessions for `shopping_customers`\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"actor\"`** \u2192 Generate identity and authentication endpoints for the\n actor type\n- **`\"session\"`** \u2192 Generate session lifecycle endpoints bound to actor\n authentication flows\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access"
297
+ description: "Architectural role of this model, guiding API endpoint generation.\n\n- \"primary\": Core entity users manage independently (full CRUD APIs). Use\n when users need to create, search, or manage entities outside their\n parent context.\n- \"actor\": Authenticated user type with its own identity, credentials, and\n auth flow. Generates auth endpoints.\n- \"session\": Login session table belonging to exactly one actor.\n Append-only audit trail, managed via auth flows.\n- \"subsidiary\": Supporting entity managed through its parent, rarely needs\n standalone endpoints.\n- \"snapshot\": Point-in-time versioning record, typically append-only and\n read-only from user perspective."
298
298
  },
299
299
  primaryField: {
300
300
  $ref: "#/components/schemas/AutoBeDatabase.IPrimaryField",
301
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping."
301
+ description: "Primary key field (UUID)."
302
302
  },
303
303
  foreignFields: {
304
304
  type: "array",
305
305
  items: {
306
306
  $ref: "#/components/schemas/AutoBeDatabase.IForeignField"
307
307
  },
308
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships."
308
+ description: "Foreign key fields establishing relationships to other models."
309
309
  },
310
310
  plainFields: {
311
311
  type: "array",
312
312
  items: {
313
313
  $ref: "#/components/schemas/AutoBeDatabase.IPlainField"
314
314
  },
315
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing."
315
+ description: "Regular data fields (names, timestamps, flags, amounts, etc.)."
316
316
  },
317
317
  uniqueIndexes: {
318
318
  type: "array",
319
319
  items: {
320
320
  $ref: "#/components/schemas/AutoBeDatabase.IUniqueIndex"
321
321
  },
322
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname)."
322
+ description: "Unique indexes for data integrity constraints."
323
323
  },
324
324
  plainIndexes: {
325
325
  type: "array",
326
326
  items: {
327
327
  $ref: "#/components/schemas/AutoBeDatabase.IPlainIndex"
328
328
  },
329
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields."
329
+ description: "Regular indexes for query performance."
330
330
  },
331
331
  ginIndexes: {
332
332
  type: "array",
333
333
  items: {
334
334
  $ref: "#/components/schemas/AutoBeDatabase.IGinIndex"
335
335
  },
336
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies."
336
+ description: "GIN indexes for PostgreSQL full-text search (trigram)."
337
337
  }
338
338
  },
339
339
  required: [
@@ -348,7 +348,7 @@ function process(ctx, props) {
348
348
  "plainIndexes",
349
349
  "ginIndexes"
350
350
  ],
351
- description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)"
351
+ description: "A single Prisma model (database table)."
352
352
  },
353
353
  "AutoBeDatabase.IPrimaryField": {
354
354
  type: "object",
@@ -356,15 +356,14 @@ function process(ctx, props) {
356
356
  name: {
357
357
  type: "string",
358
358
  pattern: "^[a-z][a-z0-9_]*$",
359
- description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table."
359
+ description: "MUST use snake_case."
360
360
  },
361
361
  type: {
362
- "const": "uuid",
363
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation."
362
+ "const": "uuid"
364
363
  },
365
364
  description: {
366
365
  type: "string",
367
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English."
366
+ description: "Business purpose of this primary key. MUST be written in English."
368
367
  }
369
368
  },
370
369
  required: [
@@ -372,7 +371,7 @@ function process(ctx, props) {
372
371
  "type",
373
372
  "description"
374
373
  ],
375
- description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure)."
374
+ description: "Primary key field of a model."
376
375
  },
377
376
  "AutoBeDatabase.IForeignField": {
378
377
  type: "object",
@@ -380,27 +379,26 @@ function process(ctx, props) {
380
379
  name: {
381
380
  type: "string",
382
381
  pattern: "^[a-z][a-z0-9_]*$",
383
- description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)"
382
+ description: "MUST use snake_case. Convention: \"{target_model}_id\"."
384
383
  },
385
384
  type: {
386
- "const": "uuid",
387
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema."
385
+ "const": "uuid"
388
386
  },
389
387
  description: {
390
388
  type: "string",
391
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English."
389
+ description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English."
392
390
  },
393
391
  relation: {
394
392
  $ref: "#/components/schemas/AutoBeDatabase.IRelation",
395
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field. This configuration is used\nto generate the appropriate Prisma relation directive in the schema."
393
+ description: "Prisma relation configuration."
396
394
  },
397
395
  unique: {
398
396
  type: "boolean",
399
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality."
397
+ description: "True for 1:1 relationships, false for 1:N."
400
398
  },
401
399
  nullable: {
402
400
  type: "boolean",
403
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations."
401
+ description: "True if the relationship is optional."
404
402
  }
405
403
  },
406
404
  required: [
@@ -411,7 +409,7 @@ function process(ctx, props) {
411
409
  "unique",
412
410
  "nullable"
413
411
  ],
414
- description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables."
412
+ description: "Foreign key field establishing a relationship to another model."
415
413
  },
416
414
  "AutoBeDatabase.IRelation": {
417
415
  type: "object",
@@ -419,16 +417,16 @@ function process(ctx, props) {
419
417
  name: {
420
418
  type: "string",
421
419
  pattern: "^[a-z][a-zA-Z0-9]*$",
422
- description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning"
420
+ description: "Relation property name in this model. MUST use camelCase."
423
421
  },
424
422
  targetModel: {
425
423
  type: "string",
426
- description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration."
424
+ description: "Must match an existing model name in the schema."
427
425
  },
428
426
  oppositeName: {
429
427
  type: "string",
430
428
  pattern: "^[a-z][a-zA-Z0-9]*$",
431
- description: "Name of the inverse relation property that will be generated in the\ntarget model.\n\nIn Prisma's bidirectional relationships, both sides need relation\nproperties. While {@link name} defines the property in the current model\n(the one with the foreign key), `oppositeName` defines the property that\nwill be generated in the target model for back-reference.\n\nFor 1:N relationships, the target model's property will be an array type.\nFor 1:1 relationships (when the foreign key has unique constraint), it\nwill be a singular reference.\n\nExamples (when this FK is defined in `bbs_article_comments` model):\n\n- Name: \"article\" \u2192 `comment.article` accesses the parent article\n- OppositeName: \"comments\" \u2192 `article.comments` accesses child comments\n\nMore examples:\n\n- \"sessions\" for `users` model to access `user_sessions[]`\n- \"snapshots\" for `bbs_articles` model to access `bbs_article_snapshots[]`\n- \"children\" for self-referential hierarchies via `parent` relation\n\nNaming convention: camelCase, typically plural for 1:N relationships,\nsingular for 1:1 relationships."
429
+ description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1."
432
430
  }
433
431
  },
434
432
  required: [
@@ -436,7 +434,7 @@ function process(ctx, props) {
436
434
  "targetModel",
437
435
  "oppositeName"
438
436
  ],
439
- description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)"
437
+ description: "Prisma"
440
438
  },
441
439
  "AutoBeDatabase.IPlainField": {
442
440
  type: "object",
@@ -444,7 +442,7 @@ function process(ctx, props) {
444
442
  name: {
445
443
  type: "string",
446
444
  pattern: "^[a-z][a-z0-9_]*$",
447
- description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative"
445
+ description: "MUST use snake_case."
448
446
  },
449
447
  type: {
450
448
  oneOf: [
@@ -470,15 +468,15 @@ function process(ctx, props) {
470
468
  "const": "datetime"
471
469
  }
472
470
  ],
473
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time"
471
+ description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime."
474
472
  },
475
473
  description: {
476
474
  type: "string",
477
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\""
475
+ description: "Business purpose of this field. MUST be written in English."
478
476
  },
479
477
  nullable: {
480
478
  type: "boolean",
481
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data."
479
+ description: "Whether this field can be null."
482
480
  }
483
481
  },
484
482
  required: [
@@ -487,7 +485,7 @@ function process(ctx, props) {
487
485
  "description",
488
486
  "nullable"
489
487
  ],
490
- description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information."
488
+ description: "A regular data field (not a primary or foreign key)."
491
489
  },
492
490
  "AutoBeDatabase.IUniqueIndex": {
493
491
  type: "object",
@@ -499,18 +497,18 @@ function process(ctx, props) {
499
497
  },
500
498
  minItems: 1,
501
499
  uniqueItems: true,
502
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]"
500
+ description: "Field names forming the unique constraint. All must exist in the model."
503
501
  },
504
502
  unique: {
505
503
  "const": true,
506
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\"."
504
+ description: "Always true. Distinguishes from plain indexes."
507
505
  }
508
506
  },
509
507
  required: [
510
508
  "fieldNames",
511
509
  "unique"
512
510
  ],
513
- description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys."
511
+ description: "Unique index constraint (@@unique)."
514
512
  },
515
513
  "AutoBeDatabase.IPlainIndex": {
516
514
  type: "object",
@@ -522,45 +520,45 @@ function process(ctx, props) {
522
520
  },
523
521
  minItems: 1,
524
522
  uniqueItems: true,
525
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]"
523
+ description: "Field names to index. Order matters for composite indexes."
526
524
  }
527
525
  },
528
526
  required: [
529
527
  "fieldNames"
530
528
  ],
531
- description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields."
529
+ description: "Regular index for query performance (@@index)."
532
530
  },
533
531
  "AutoBeDatabase.IGinIndex": {
534
532
  type: "object",
535
533
  properties: {
536
534
  fieldName: {
537
535
  type: "string",
538
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search."
536
+ description: "Must be a string field containing searchable text."
539
537
  }
540
538
  },
541
539
  required: [
542
540
  "fieldName"
543
541
  ],
544
- description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content."
542
+ description: "GIN index for PostgreSQL full-text search (gin_trgm_ops)."
545
543
  },
546
544
  AutoBeDatabaseComponentTableDesign: {
547
545
  type: "object",
548
546
  properties: {
549
547
  description: {
550
548
  type: "string",
551
- description: "Brief, concise description of what this table stores and why it's needed.\n\nShould explain:\n\n- What business concept this table represents\n- What data it stores\n- Why this table is necessary for the component's domain\n\n**IMPORTANT**:\n\n- Keep it **concise** - one or two sentences maximum\n- Description must be written in English"
549
+ description: "Business purpose of this table. One or two sentences maximum. MUST be\nwritten in English."
552
550
  },
553
551
  name: {
554
552
  type: "string",
555
553
  pattern: "^[a-z][a-z0-9_]*$",
556
- description: "Name of the database table.\n\nMust follow snake_case naming convention with appropriate domain prefix.\nExamples: `shopping_customers`, `bbs_articles`, `order_items`"
554
+ description: "Table name in snake_case with domain prefix (e.g., \"shopping_customers\")."
557
555
  }
558
556
  },
559
557
  required: [
560
558
  "description",
561
559
  "name"
562
560
  ],
563
- description: "Table design with name and description.\n\nRepresents a single table identified during the component extraction phase,\npairing the table name with a description of its purpose. This type\nformalizes the table design structure for database schema generation.\n\nThe description provides business context that helps:\n\n- Review agents validate that the table fulfills actual requirements\n- Schema generation create appropriate models with proper documentation\n- Future developers understand the table's role in the system"
561
+ description: "Table design with name and description."
564
562
  }
565
563
  }
566
564
  },
@@ -578,7 +576,7 @@ function process(ctx, props) {
578
576
  }
579
577
  }
580
578
  ],
581
- description: "Process schema generation task or preliminary data requests.\n\nGenerates database models for the target component following normalization\nprinciples and database design best practices."
579
+ description: "Process schema generation task or retrieve preliminary data."
582
580
  }
583
581
  ]
584
582
  },
@@ -1103,11 +1101,11 @@ function createController(props) {
1103
1101
  type: "object",
1104
1102
  properties: {
1105
1103
  thinking: {
1106
- description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on\nyour current state and explain your reasoning:\n\nFor preliminary requests (getAnalysisSections, getDatabaseSchemas, etc.):\n\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature\ncompletion.",
1104
+ description: "Think before you act.\n\nFor preliminary requests: what critical information is missing and why?\nBe brief \u2014 state the gap, don't list everything you have.\n\nFor completion: what key assets did you acquire, what did you accomplish,\nwhy is it sufficient? Summarize \u2014 don't enumerate every single item.",
1107
1105
  type: "string"
1108
1106
  },
1109
1107
  request: {
1110
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisSections, getPreviousAnalysisSections,\ngetPreviousDatabaseSchemas) or final schema generation (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
1108
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls.",
1111
1109
  anyOf: [
1112
1110
  {
1113
1111
  $ref: "#/$defs/IAutoBePreliminaryGetPreviousAnalysisSections"
@@ -1140,18 +1138,18 @@ function createController(props) {
1140
1138
  additionalProperties: false,
1141
1139
  $defs: {
1142
1140
  IAutoBePreliminaryGetPreviousAnalysisSections: {
1143
- description: "Request to retrieve individual analysis sections from previous iteration by\nnumeric ID.\n\nSame as {@link IAutoBePreliminaryGetAnalysisSections} but for sections from\nthe previous generation cycle, enabling comparison and consistency checks.",
1141
+ description: "Request to retrieve analysis sections from the previous iteration by numeric\nID.",
1144
1142
  type: "object",
1145
1143
  properties: {
1146
1144
  type: {
1147
- description: "Type discriminator for the request.\n\nValue \"getPreviousAnalysisSections\" indicates this is a preliminary data\nrequest for analysis sections from the previous iteration.",
1145
+ description: "Type discriminator.",
1148
1146
  type: "string",
1149
1147
  "enum": [
1150
1148
  "getPreviousAnalysisSections"
1151
1149
  ]
1152
1150
  },
1153
1151
  sectionIds: {
1154
- description: "List of section IDs to retrieve from the previous iteration.\n\nCRITICAL: DO NOT request the same section IDs that you have already\nrequested in previous calls.",
1152
+ description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls.",
1155
1153
  type: "array",
1156
1154
  items: {
1157
1155
  type: "integer",
@@ -1166,18 +1164,18 @@ function createController(props) {
1166
1164
  ]
1167
1165
  },
1168
1166
  IAutoBePreliminaryGetAnalysisSections: {
1169
- description: "Request to retrieve individual analysis sections by numeric ID.\n\nInstead of loading entire analysis files (~110-120KB each), this loads\nspecific ### sections (~200-600 words each) identified by integer IDs from\nthe section catalog.",
1167
+ description: "Request to retrieve individual analysis sections by numeric ID.",
1170
1168
  type: "object",
1171
1169
  properties: {
1172
1170
  type: {
1173
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisSections\" indicates this is a preliminary\ndata request for individual analysis sections.",
1171
+ description: "Type discriminator.",
1174
1172
  type: "string",
1175
1173
  "enum": [
1176
1174
  "getAnalysisSections"
1177
1175
  ]
1178
1176
  },
1179
1177
  sectionIds: {
1180
- description: "List of section IDs to retrieve.\n\nThese are sequential integer IDs from the analysis sections catalog. Each\nID maps to a specific ### section in the requirements documents.\n\nCRITICAL: DO NOT request the same section IDs that you have already\nrequested in previous calls.",
1178
+ description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls.",
1181
1179
  type: "array",
1182
1180
  items: {
1183
1181
  type: "integer",
@@ -1193,18 +1191,18 @@ function createController(props) {
1193
1191
  ]
1194
1192
  },
1195
1193
  IAutoBePreliminaryGetPreviousDatabaseSchemas: {
1196
- description: "Request to retrieve database schemas from a previous version.\n\nThis type is used to load database schema definitions that were generated in\na **previous version** of the AutoBE generation pipeline. This is NOT about\nre-requesting schemas within the same execution, but rather accessing\nartifacts from an earlier version.\n\n**Use Case:** When regenerating or modifying the database schema based on\nuser change requests, agents need to reference the previously generated\ndatabase schemas to understand the existing database structure and what needs\nto be modified.\n\n**Key Difference from `getDatabaseSchemas`:**\n\n- `getDatabaseSchemas`: Fetches schemas from the **current version** (the\n version being generated right now)\n- `getPreviousDatabaseSchemas`: Fetches schemas from the **previous version**\n (the last successfully generated version)\n\n**Example Scenario:**\n\n Initial generation:\n - DATABASE phase creates: users, posts, comments tables\n - Generation completes successfully\n\n User: \"Add email verification status to users\"\n\n Regeneration:\n - DATABASE phase starts regeneration\n - Calls getPreviousDatabaseSchemas([\"users\"])\n \u2192 Loads the previous version of users table schema\n - Creates new version with emailVerified field added\n\n**Waterfall + Spiral Pattern:**\n\nThis aligns with AutoBE's regeneration cycles where:\n\n- Compilation failures trigger regeneration with corrections\n- User modifications trigger new versions\n- Previous schemas serve as reference for incremental changes",
1194
+ description: "Request to retrieve database schemas from the previous iteration.\n\nLoads database table definitions from the last successfully generated\nversion, used as reference context during regeneration or modification\ncycles.",
1197
1195
  type: "object",
1198
1196
  properties: {
1199
1197
  type: {
1200
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getPreviousDatabaseSchemas\" indicates this is a\npreliminary data request for database schemas from a previous version.",
1198
+ description: "Type discriminator.",
1201
1199
  type: "string",
1202
1200
  "enum": [
1203
1201
  "getPreviousDatabaseSchemas"
1204
1202
  ]
1205
1203
  },
1206
1204
  schemaNames: {
1207
- description: "List of database table names to retrieve from the previous version.\n\nThese are table schema names that were generated in a previous version and\nare needed as reference context for the current regeneration.\n\n**Important Notes:**\n\n- These schemas MUST exist in the previous version\n- This function is only available when a previous version exists\n- Used for reference/comparison, not for re-requesting within same execution\n- Table names are in snake_case (e.g., \"shopping_sale\", \"bbs_article\")\n\n**When This Function is Available:**\n\n- When a previous version exists\n- When user requests modifications to existing database schema\n- During correction/regeneration cycles that need previous schema context\n\n**When This Function is NOT Available:**\n\n- During initial generation (no previous version exists)\n- No previous database schemas available for this orchestration task\n\n**Example Table Names:**\n\n- \"users\", \"posts\", \"comments\"\n- \"shopping_sales\", \"shopping_orders\", \"shopping_products\"\n- \"bbs_articles\", \"bbs_article_files\"",
1205
+ description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls.",
1208
1206
  type: "array",
1209
1207
  items: {
1210
1208
  type: "string"
@@ -1218,22 +1216,22 @@ function createController(props) {
1218
1216
  ]
1219
1217
  },
1220
1218
  "IAutoBeDatabaseSchemaApplication.IComplete": {
1221
- description: "Request to generate database schema models.\n\nExecutes schema generation to create production-ready database models\nfollowing normalization principles, relationship patterns, and indexing\nstrategies.",
1219
+ description: "Generate production-ready database schema models with normalization and\nindexing.",
1222
1220
  type: "object",
1223
1221
  properties: {
1224
1222
  type: {
1225
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
1223
+ description: "Type discriminator for completion request.",
1226
1224
  type: "string",
1227
1225
  "enum": [
1228
1226
  "complete"
1229
1227
  ]
1230
1228
  },
1231
1229
  plan: {
1232
- description: "Strategic database design analysis and planning.\n\nContains the database architecture strategy for the target table and any\nchild tables needed for First Normal Form (1NF) compliance, including\nstructure, relationships, normalization approach, indexing strategies,\nand business requirement mapping. This planning phase defines the\nblueprint for the model implementations.\n\nKey planning aspects:\n\n- Assignment validation: Extract targetTable as the assignment\n- Target table: The primary table matching targetTable is mandatory\n- Child tables: Additional tables to decompose repeating groups or\n non-atomic values into separate normalized tables (1NF compliance)\n- Child table naming: Must use singular form of targetTable as prefix\n (e.g., for \"shopping_orders\": \"shopping_order_items\")\n- Other tables: Identify existing tables from otherComponents for foreign\n key relationships \u2014 never recreate them\n- Normalization: Strict adherence to 1NF, 2NF, 3NF principles\n- Snapshot architecture: Design for historical data preservation\n- Junction tables: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- Materialized views: Identify needs for mv_ prefixed denormalized tables",
1230
+ description: "Database design plan for the target table and any child tables (1NF\ndecomposition).\n\nChild table naming: singular form of targetTable as prefix (e.g.,\n\"shopping_order_items\"). Never recreate existing tables from\notherComponents. Strict 1NF/2NF/3NF adherence. Junction tables:\n{table1}_{table2}. Materialized views: mv_ prefix.",
1233
1231
  type: "string"
1234
1232
  },
1235
1233
  definition: {
1236
- description: "Schema definition containing the single target table model and any newly\ndiscovered table designs.\n\nThe definition carries exactly one\n{@link AutoBeDatabaseSchemaDefinition.model} \u2014 the target table assigned\nto this call \u2014 so that the output stays within the LLM's maximum output\ntoken limit. If normalization (e.g. 1NF decomposition) requires\nadditional child tables, declare them in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as lightweight name +\ndescription pairs; they will be generated by their own dedicated pipeline\ncalls.\n\nModel implementation requirements:\n\n- Primary keys: Always UUID type with field name \"id\"\n- Foreign keys: Proper IRelation configurations for all relationships\n- Business fields: Only raw data fields - no calculated or derived values\n- Data types: Limited to uuid, string, int, double, datetime, boolean, uri\n- Relationships: Correct patterns for 1:1, 1:N, and M:N\n- Indexes:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK)\n - GinIndexes: Full-text search on appropriate string fields\n- Materialized views: Tables prefixed with \"mv_\" have material flag set\n- Documentation: Comprehensive English descriptions with business context\n\nQuality standards:\n\n- Strict adherence to 3NF (Third Normal Form)\n- No denormalization except in materialized views (mv_ tables)\n- All foreign keys reference valid existing tables\n- Consistent created_at, updated_at, deleted_at patterns\n- Proper historical data preservation where needed\n- Optimized index strategy for expected query patterns",
1234
+ description: "Schema definition with exactly one\n{@link AutoBeDatabaseSchemaDefinition.model} (the target table).\nAdditional child tables go in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as name + description\npairs.\n\nKey rules: UUID \"id\" primary keys, data types limited to\nuuid/string/int/double/ datetime/boolean/uri, no derived values, strict\n3NF, mv_ prefix for materialized views, consistent\ncreated_at/updated_at/deleted_at, PlainIndexes never single FK.",
1237
1235
  $ref: "#/$defs/AutoBeDatabaseSchemaDefinition"
1238
1236
  }
1239
1237
  },
@@ -1244,15 +1242,15 @@ function createController(props) {
1244
1242
  ]
1245
1243
  },
1246
1244
  AutoBeDatabaseSchemaDefinition: {
1247
- description: "Database schema definition produced by a single schema generation or review\ncall.\n\nEach AI function call outputs exactly one target table model together with a\nlist of newly discovered table designs. The single-model constraint keeps the\noutput payload small enough to fit within the LLM's maximum output token\nlimit, while `newDesigns` lets the agent declare additional tables that\nshould be generated in subsequent calls through the normal pipeline.",
1245
+ description: "Output of a single schema generation or review call.\n\nOne target table model + lightweight designs for newly discovered child\ntables. Single-model constraint keeps output within LLM token budget.",
1248
1246
  type: "object",
1249
1247
  properties: {
1250
1248
  model: {
1251
- description: "The single database table model produced by this call.\n\nAlways represents the target table that was assigned to the agent. Limiting\nthe output to one model prevents the response from exceeding the LLM's\nmaximum output token budget.",
1249
+ description: "The single database table model produced by this call.",
1252
1250
  $ref: "#/$defs/AutoBeDatabase.IModel"
1253
1251
  },
1254
1252
  newDesigns: {
1255
- description: "Lightweight designs for additional tables discovered during generation or\nreview.\n\nWhen the agent determines that 1NF decomposition or other normalization\nrequires child tables that do not yet exist, it declares them here as\nname+description pairs rather than full model definitions.\n\nThese designs are fed back into the schema generation pipeline so that each\nnew table is produced by its own dedicated call.",
1253
+ description: "Name+description pairs for child tables discovered during generation (1NF\ndecomposition, junction tables, etc.). Each feeds back into the pipeline as\na separate generation call.",
1256
1254
  type: "array",
1257
1255
  items: {
1258
1256
  $ref: "#/$defs/AutoBeDatabaseComponentTableDesign"
@@ -1265,24 +1263,24 @@ function createController(props) {
1265
1263
  ]
1266
1264
  },
1267
1265
  "AutoBeDatabase.IModel": {
1268
- description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)",
1266
+ description: "A single Prisma model (database table).",
1269
1267
  type: "object",
1270
1268
  properties: {
1271
1269
  name: {
1272
- description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"",
1270
+ description: "MUST use snake_case. Materialized views use \"mv_\" prefix.",
1273
1271
  type: "string",
1274
1272
  pattern: "^[a-z][a-z0-9_]*$"
1275
1273
  },
1276
1274
  description: {
1277
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
1275
+ description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax.",
1278
1276
  type: "string"
1279
1277
  },
1280
1278
  material: {
1281
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
1279
+ description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix.",
1282
1280
  type: "boolean"
1283
1281
  },
1284
1282
  stance: {
1285
- description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"actor\"` - Authenticated Actor Entity\n\nTables that represent a true actor in the system (a distinct user type\nwith its own authentication flow, table schema, and business logic).\nActor tables are the canonical identity records used across the system,\nand their sessions are recorded in a separate session table.\n\n**Key principle**: If the user type requires a distinct table and\nauthentication flow (not just an attribute), the table is an actor.\n\n**Characteristics:**\n\n- Serves as the primary identity record for that actor type\n- Owns credentials and actor-specific profile data\n- Has one-to-many sessions stored in a dedicated session table\n- Used as the root of permission and ownership relationships\n\n**Examples:**\n\n- `users` - Standard application users with authentication\n- `shopping_customers` - Customers with login and purchase history\n- `shopping_sellers` - Sellers with business credentials\n- `administrators` - Admins with elevated permissions\n\n### `\"session\"` - Actor Session Entity\n\nTables that represent login sessions for a specific actor. A session\ntable always belongs to exactly one actor type and contains connection\ncontext and temporal fields for auditing.\n\n**Key principle**: A session table exists only to track actor logins and\nmust reference exactly one actor table.\n\n**Characteristics:**\n\n- Child of a single actor table (many sessions per actor)\n- Stores connection metadata (IP, headers, referrer)\n- Append-only audit trail of login events\n- Managed through authentication flows, not direct user CRUD\n\n**Examples:**\n\n- `user_sessions` - Sessions for `users`\n- `shopping_customer_sessions` - Sessions for `shopping_customers`\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"actor\"`** \u2192 Generate identity and authentication endpoints for the\n actor type\n- **`\"session\"`** \u2192 Generate session lifecycle endpoints bound to actor\n authentication flows\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
1283
+ description: "Architectural role of this model, guiding API endpoint generation.\n\n- \"primary\": Core entity users manage independently (full CRUD APIs). Use\n when users need to create, search, or manage entities outside their\n parent context.\n- \"actor\": Authenticated user type with its own identity, credentials, and\n auth flow. Generates auth endpoints.\n- \"session\": Login session table belonging to exactly one actor.\n Append-only audit trail, managed via auth flows.\n- \"subsidiary\": Supporting entity managed through its parent, rarely needs\n standalone endpoints.\n- \"snapshot\": Point-in-time versioning record, typically append-only and\n read-only from user perspective.",
1286
1284
  type: "string",
1287
1285
  "enum": [
1288
1286
  "primary",
@@ -1293,39 +1291,39 @@ function createController(props) {
1293
1291
  ]
1294
1292
  },
1295
1293
  primaryField: {
1296
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
1294
+ description: "Primary key field (UUID).",
1297
1295
  $ref: "#/$defs/AutoBeDatabase.IPrimaryField"
1298
1296
  },
1299
1297
  foreignFields: {
1300
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
1298
+ description: "Foreign key fields establishing relationships to other models.",
1301
1299
  type: "array",
1302
1300
  items: {
1303
1301
  $ref: "#/$defs/AutoBeDatabase.IForeignField"
1304
1302
  }
1305
1303
  },
1306
1304
  plainFields: {
1307
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
1305
+ description: "Regular data fields (names, timestamps, flags, amounts, etc.).",
1308
1306
  type: "array",
1309
1307
  items: {
1310
1308
  $ref: "#/$defs/AutoBeDatabase.IPlainField"
1311
1309
  }
1312
1310
  },
1313
1311
  uniqueIndexes: {
1314
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
1312
+ description: "Unique indexes for data integrity constraints.",
1315
1313
  type: "array",
1316
1314
  items: {
1317
1315
  $ref: "#/$defs/AutoBeDatabase.IUniqueIndex"
1318
1316
  }
1319
1317
  },
1320
1318
  plainIndexes: {
1321
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
1319
+ description: "Regular indexes for query performance.",
1322
1320
  type: "array",
1323
1321
  items: {
1324
1322
  $ref: "#/$defs/AutoBeDatabase.IPlainIndex"
1325
1323
  }
1326
1324
  },
1327
1325
  ginIndexes: {
1328
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
1326
+ description: "GIN indexes for PostgreSQL full-text search (trigram).",
1329
1327
  type: "array",
1330
1328
  items: {
1331
1329
  $ref: "#/$defs/AutoBeDatabase.IGinIndex"
@@ -1346,23 +1344,22 @@ function createController(props) {
1346
1344
  ]
1347
1345
  },
1348
1346
  "AutoBeDatabase.IPrimaryField": {
1349
- description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
1347
+ description: "Primary key field of a model.",
1350
1348
  type: "object",
1351
1349
  properties: {
1352
1350
  name: {
1353
- description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.",
1351
+ description: "MUST use snake_case.",
1354
1352
  type: "string",
1355
1353
  pattern: "^[a-z][a-z0-9_]*$"
1356
1354
  },
1357
1355
  type: {
1358
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
1359
1356
  type: "string",
1360
1357
  "enum": [
1361
1358
  "uuid"
1362
1359
  ]
1363
1360
  },
1364
1361
  description: {
1365
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
1362
+ description: "Business purpose of this primary key. MUST be written in English.",
1366
1363
  type: "string"
1367
1364
  }
1368
1365
  },
@@ -1373,35 +1370,34 @@ function createController(props) {
1373
1370
  ]
1374
1371
  },
1375
1372
  "AutoBeDatabase.IForeignField": {
1376
- description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
1373
+ description: "Foreign key field establishing a relationship to another model.",
1377
1374
  type: "object",
1378
1375
  properties: {
1379
1376
  name: {
1380
- description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)",
1377
+ description: "MUST use snake_case. Convention: \"{target_model}_id\".",
1381
1378
  type: "string",
1382
1379
  pattern: "^[a-z][a-z0-9_]*$"
1383
1380
  },
1384
1381
  type: {
1385
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
1386
1382
  type: "string",
1387
1383
  "enum": [
1388
1384
  "uuid"
1389
1385
  ]
1390
1386
  },
1391
1387
  description: {
1392
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
1388
+ description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English.",
1393
1389
  type: "string"
1394
1390
  },
1395
1391
  relation: {
1396
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field. This configuration is used\nto generate the appropriate Prisma relation directive in the schema.",
1392
+ description: "Prisma relation configuration.",
1397
1393
  $ref: "#/$defs/AutoBeDatabase.IRelation"
1398
1394
  },
1399
1395
  unique: {
1400
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
1396
+ description: "True for 1:1 relationships, false for 1:N.",
1401
1397
  type: "boolean"
1402
1398
  },
1403
1399
  nullable: {
1404
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
1400
+ description: "True if the relationship is optional.",
1405
1401
  type: "boolean"
1406
1402
  }
1407
1403
  },
@@ -1415,20 +1411,20 @@ function createController(props) {
1415
1411
  ]
1416
1412
  },
1417
1413
  "AutoBeDatabase.IRelation": {
1418
- description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)",
1414
+ description: "Prisma",
1419
1415
  type: "object",
1420
1416
  properties: {
1421
1417
  name: {
1422
- description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning",
1418
+ description: "Relation property name in this model. MUST use camelCase.",
1423
1419
  type: "string",
1424
1420
  pattern: "^[a-z][a-zA-Z0-9]*$"
1425
1421
  },
1426
1422
  targetModel: {
1427
- description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration.",
1423
+ description: "Must match an existing model name in the schema.",
1428
1424
  type: "string"
1429
1425
  },
1430
1426
  oppositeName: {
1431
- description: "Name of the inverse relation property that will be generated in the\ntarget model.\n\nIn Prisma's bidirectional relationships, both sides need relation\nproperties. While {@link name} defines the property in the current model\n(the one with the foreign key), `oppositeName` defines the property that\nwill be generated in the target model for back-reference.\n\nFor 1:N relationships, the target model's property will be an array type.\nFor 1:1 relationships (when the foreign key has unique constraint), it\nwill be a singular reference.\n\nExamples (when this FK is defined in `bbs_article_comments` model):\n\n- Name: \"article\" \u2192 `comment.article` accesses the parent article\n- OppositeName: \"comments\" \u2192 `article.comments` accesses child comments\n\nMore examples:\n\n- \"sessions\" for `users` model to access `user_sessions[]`\n- \"snapshots\" for `bbs_articles` model to access `bbs_article_snapshots[]`\n- \"children\" for self-referential hierarchies via `parent` relation\n\nNaming convention: camelCase, typically plural for 1:N relationships,\nsingular for 1:1 relationships.",
1427
+ description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1.",
1432
1428
  type: "string",
1433
1429
  pattern: "^[a-z][a-zA-Z0-9]*$"
1434
1430
  }
@@ -1440,16 +1436,16 @@ function createController(props) {
1440
1436
  ]
1441
1437
  },
1442
1438
  "AutoBeDatabase.IPlainField": {
1443
- description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
1439
+ description: "A regular data field (not a primary or foreign key).",
1444
1440
  type: "object",
1445
1441
  properties: {
1446
1442
  name: {
1447
- description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
1443
+ description: "MUST use snake_case.",
1448
1444
  type: "string",
1449
1445
  pattern: "^[a-z][a-z0-9_]*$"
1450
1446
  },
1451
1447
  type: {
1452
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time",
1448
+ description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime.",
1453
1449
  type: "string",
1454
1450
  "enum": [
1455
1451
  "string",
@@ -1462,11 +1458,11 @@ function createController(props) {
1462
1458
  ]
1463
1459
  },
1464
1460
  description: {
1465
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
1461
+ description: "Business purpose of this field. MUST be written in English.",
1466
1462
  type: "string"
1467
1463
  },
1468
1464
  nullable: {
1469
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
1465
+ description: "Whether this field can be null.",
1470
1466
  type: "boolean"
1471
1467
  }
1472
1468
  },
@@ -1478,11 +1474,11 @@ function createController(props) {
1478
1474
  ]
1479
1475
  },
1480
1476
  "AutoBeDatabase.IUniqueIndex": {
1481
- description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
1477
+ description: "Unique index constraint (@@unique).",
1482
1478
  type: "object",
1483
1479
  properties: {
1484
1480
  fieldNames: {
1485
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
1481
+ description: "Field names forming the unique constraint. All must exist in the model.",
1486
1482
  type: "array",
1487
1483
  items: {
1488
1484
  type: "string"
@@ -1491,7 +1487,7 @@ function createController(props) {
1491
1487
  uniqueItems: true
1492
1488
  },
1493
1489
  unique: {
1494
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
1490
+ description: "Always true. Distinguishes from plain indexes.",
1495
1491
  type: "boolean",
1496
1492
  "enum": [
1497
1493
  true
@@ -1504,11 +1500,11 @@ function createController(props) {
1504
1500
  ]
1505
1501
  },
1506
1502
  "AutoBeDatabase.IPlainIndex": {
1507
- description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
1503
+ description: "Regular index for query performance (@@index).",
1508
1504
  type: "object",
1509
1505
  properties: {
1510
1506
  fieldNames: {
1511
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
1507
+ description: "Field names to index. Order matters for composite indexes.",
1512
1508
  type: "array",
1513
1509
  items: {
1514
1510
  type: "string"
@@ -1522,11 +1518,11 @@ function createController(props) {
1522
1518
  ]
1523
1519
  },
1524
1520
  "AutoBeDatabase.IGinIndex": {
1525
- description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
1521
+ description: "GIN index for PostgreSQL full-text search (gin_trgm_ops).",
1526
1522
  type: "object",
1527
1523
  properties: {
1528
1524
  fieldName: {
1529
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
1525
+ description: "Must be a string field containing searchable text.",
1530
1526
  type: "string"
1531
1527
  }
1532
1528
  },
@@ -1535,15 +1531,15 @@ function createController(props) {
1535
1531
  ]
1536
1532
  },
1537
1533
  AutoBeDatabaseComponentTableDesign: {
1538
- description: "Table design with name and description.\n\nRepresents a single table identified during the component extraction phase,\npairing the table name with a description of its purpose. This type\nformalizes the table design structure for database schema generation.\n\nThe description provides business context that helps:\n\n- Review agents validate that the table fulfills actual requirements\n- Schema generation create appropriate models with proper documentation\n- Future developers understand the table's role in the system",
1534
+ description: "Table design with name and description.",
1539
1535
  type: "object",
1540
1536
  properties: {
1541
1537
  description: {
1542
- description: "Brief, concise description of what this table stores and why it's needed.\n\nShould explain:\n\n- What business concept this table represents\n- What data it stores\n- Why this table is necessary for the component's domain\n\n**IMPORTANT**:\n\n- Keep it **concise** - one or two sentences maximum\n- Description must be written in English",
1538
+ description: "Business purpose of this table. One or two sentences maximum. MUST be\nwritten in English.",
1543
1539
  type: "string"
1544
1540
  },
1545
1541
  name: {
1546
- description: "Name of the database table.\n\nMust follow snake_case naming convention with appropriate domain prefix.\nExamples: `shopping_customers`, `bbs_articles`, `order_items`",
1542
+ description: "Table name in snake_case with domain prefix (e.g., \"shopping_customers\").",
1547
1543
  type: "string",
1548
1544
  pattern: "^[a-z][a-z0-9_]*$"
1549
1545
  }
@@ -1555,7 +1551,7 @@ function createController(props) {
1555
1551
  }
1556
1552
  }
1557
1553
  },
1558
- description: "Process schema generation task or preliminary data requests.\n\nGenerates database models for the target component following normalization\nprinciples and database design best practices.",
1554
+ description: "Process schema generation task or retrieve preliminary data.",
1559
1555
  validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.length <= 100 && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io2 = input => "getPreviousAnalysisSections" === input.type && (Array.isArray(input.sectionIds) && (1 <= input.sectionIds.length && input.sectionIds.every(elem => "number" === typeof elem && __typia_transform__isTypeUint32._isTypeUint32(elem)))); const _io3 = input => "getPreviousDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io4 = input => "complete" === input.type && "string" === typeof input.plan && ("object" === typeof input.definition && null !== input.definition && _io5(input.definition)); const _io5 = input => "object" === typeof input.model && null !== input.model && _io6(input.model) && (Array.isArray(input.newDesigns) && input.newDesigns.every(elem => "object" === typeof elem && null !== elem && _io14(elem))); const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || "actor" === input.stance || "session" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io7(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io10(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io11(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io13(elem))); const _io7 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io8 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io9(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io9 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel && ("string" === typeof input.oppositeName && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.oppositeName)); const _io10 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io11 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io12 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io13 = input => "string" === typeof input.fieldName; const _io14 = input => "string" === typeof input.description && ("string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name)); const _iu0 = input => (() => {
1560
1556
  if ("getPreviousAnalysisSections" === input.type)
1561
1557
  return _io2(input);