@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
@@ -157,7 +157,7 @@ function execute(ctx, failure) {
157
157
  properties: {
158
158
  thinking: {
159
159
  type: "string",
160
- 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."
160
+ 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."
161
161
  },
162
162
  request: {
163
163
  oneOf: [
@@ -187,7 +187,7 @@ function execute(ctx, failure) {
187
187
  complete: "#/components/schemas/IAutoBeDatabaseCorrectApplication.IComplete"
188
188
  }
189
189
  },
190
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisSections, getPreviousAnalysisSections, getDatabaseSchemas,\ngetPreviousDatabaseSchemas) or final schema correction (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls."
190
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls."
191
191
  }
192
192
  },
193
193
  required: [
@@ -200,7 +200,7 @@ function execute(ctx, failure) {
200
200
  properties: {
201
201
  type: {
202
202
  "const": "getAnalysisSections",
203
- 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."
203
+ description: "Type discriminator."
204
204
  },
205
205
  sectionIds: {
206
206
  type: "array",
@@ -210,21 +210,21 @@ function execute(ctx, failure) {
210
210
  },
211
211
  minItems: 1,
212
212
  maxItems: 100,
213
- 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."
213
+ description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls."
214
214
  }
215
215
  },
216
216
  required: [
217
217
  "type",
218
218
  "sectionIds"
219
219
  ],
220
- 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."
220
+ description: "Request to retrieve individual analysis sections by numeric ID."
221
221
  },
222
222
  IAutoBePreliminaryGetDatabaseSchemas: {
223
223
  type: "object",
224
224
  properties: {
225
225
  type: {
226
226
  "const": "getDatabaseSchemas",
227
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getDatabaseSchemas\" indicates this is a preliminary\ndata request for database schemas."
227
+ description: "Type discriminator."
228
228
  },
229
229
  schemaNames: {
230
230
  type: "array",
@@ -232,21 +232,21 @@ function execute(ctx, failure) {
232
232
  type: "string"
233
233
  },
234
234
  minItems: 1,
235
- description: "List of database table names to retrieve.\n\nTable names from the database schema representing database entities (e.g.,\n\"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls."
235
+ description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls."
236
236
  }
237
237
  },
238
238
  required: [
239
239
  "type",
240
240
  "schemaNames"
241
241
  ],
242
- description: "Request to retrieve database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific database table\nschemas needed for generating type-safe API operations."
242
+ description: "Request to retrieve database schema definitions for context."
243
243
  },
244
244
  IAutoBePreliminaryGetPreviousAnalysisSections: {
245
245
  type: "object",
246
246
  properties: {
247
247
  type: {
248
248
  "const": "getPreviousAnalysisSections",
249
- description: "Type discriminator for the request.\n\nValue \"getPreviousAnalysisSections\" indicates this is a preliminary data\nrequest for analysis sections from the previous iteration."
249
+ description: "Type discriminator."
250
250
  },
251
251
  sectionIds: {
252
252
  type: "array",
@@ -255,21 +255,21 @@ function execute(ctx, failure) {
255
255
  minimum: 0
256
256
  },
257
257
  minItems: 1,
258
- 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."
258
+ description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls."
259
259
  }
260
260
  },
261
261
  required: [
262
262
  "type",
263
263
  "sectionIds"
264
264
  ],
265
- 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."
265
+ description: "Request to retrieve analysis sections from the previous iteration by numeric\nID."
266
266
  },
267
267
  IAutoBePreliminaryGetPreviousDatabaseSchemas: {
268
268
  type: "object",
269
269
  properties: {
270
270
  type: {
271
271
  "const": "getPreviousDatabaseSchemas",
272
- 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."
272
+ description: "Type discriminator."
273
273
  },
274
274
  schemaNames: {
275
275
  type: "array",
@@ -277,32 +277,32 @@ function execute(ctx, failure) {
277
277
  type: "string"
278
278
  },
279
279
  minItems: 1,
280
- 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\""
280
+ description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls."
281
281
  }
282
282
  },
283
283
  required: [
284
284
  "type",
285
285
  "schemaNames"
286
286
  ],
287
- 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"
287
+ 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."
288
288
  },
289
289
  "IAutoBeDatabaseCorrectApplication.IComplete": {
290
290
  type: "object",
291
291
  properties: {
292
292
  type: {
293
293
  "const": "complete",
294
- 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."
294
+ description: "Type discriminator for completion request."
295
295
  },
296
296
  planning: {
297
297
  type: "string",
298
- description: "Detailed execution plan for fixing validation errors.\n\nContains systematic reasoning and step-by-step error resolution approach\nfor targeted model validation issues.\n\nRequired planning content:\n\n1. Error scope analysis:\n\n - List all validation errors from IAutoBeDatabaseValidation.IError[]\n - Extract unique table names to identify affected models\n - Categorize errors by type (field duplications, references, types,\n indexes)\n - Identify which models need correction vs. remain unchanged\n2. Targeted fix strategy:\n\n - Focus ONLY on models mentioned in validation errors\n - Outline minimal changes needed for each affected model\n - Plan cross-model reference updates without modifying non-error models\n - Ensure unchanged models maintain valid references to corrected models\n3. Model-specific fix plan:\n\n - Model-by-model modification plan for ONLY affected models\n - Exact field additions, renames, or type corrections required\n - Reference updates within corrected models only\n - Index corrections limited to affected models\n4. Minimal scope validation:\n\n - Confirm which models will be included in output (error models only)\n - List models that will remain unchanged in original schema\n - Identify cross-model dependencies without including unchanged models\n - Preserve all business logic within corrected models\n5. Targeted impact assessment:\n\n - Potential effects of fixes on unchanged models (reference validation)\n - Verification points for corrected models only\n - Ensure no new validation errors in targeted models\n - Confirm minimal output scope compliance"
298
+ description: "Execution plan for fixing validation errors. Required steps:\n\n1. Error scope analysis \u2014 list all validation errors, extract affected table\n names, categorize by type (duplications, references, types, indexes)\n2. Targeted fix strategy \u2014 focus ONLY on models in errors, outline minimal\n changes per model\n3. Model-specific fix plan \u2014 detail corrections per affected model\n4. Minimal scope validation \u2014 confirm which models are in/out of output\n5. Targeted impact assessment \u2014 verify fixes don't break references from\n unchanged models\n\nPreserve all business logic and cross-model references."
299
299
  },
300
300
  models: {
301
301
  type: "array",
302
302
  items: {
303
303
  $ref: "#/components/schemas/AutoBeDatabase.IModel"
304
304
  },
305
- description: "Models with validation errors that need correction.\n\nContains ONLY models mentioned in IAutoBeDatabaseValidation.IError[]\narray. Each model has specific validation errors requiring targeted\ncorrection. Models not mentioned in errors are excluded from this input.\n\nExpected validation issues:\n\n- Duplicate field/relation names within these specific models\n- Invalid foreign key references from these models to other models\n- Single foreign key fields in index arrays within these models\n- Invalid naming conventions within these specific models\n- Type validation errors in fields of these models\n\nModel content analysis:\n\n- Complete field definitions for each error model only\n- Relationships from these models (may reference unchanged models)\n- Indexes within these models that need correction\n- Business descriptions specific to these models\n- Cross-model references that need validation (read-only for targets)\n\nProcessing notes:\n\n- Input contains ONLY models with validation errors\n- May reference other models not included in this input\n- Cross-model references must be validated but target models won't be\n modified\n- Output should return corrected versions of ONLY these input models\n- All business logic and descriptions within these models must be preserved\n- Corrections must not break references from unchanged models"
305
+ description: "Models with validation errors that need correction.\n\nContains ONLY models from IAutoBeDatabaseValidation.IError[]. Output\ncorrected versions of these models only. Cross-model references must stay\nvalid but target models are not modified."
306
306
  }
307
307
  },
308
308
  required: [
@@ -310,7 +310,7 @@ function execute(ctx, failure) {
310
310
  "planning",
311
311
  "models"
312
312
  ],
313
- description: "Request to fix validation errors in database models.\n\nExecutes targeted error correction to resolve specific validation issues in\naffected models only. Applies minimal changes while preserving original\ndesign intent and business logic."
313
+ description: "Fix validation errors in affected models only, preserving design intent and\nbusiness logic."
314
314
  },
315
315
  "AutoBeDatabase.IModel": {
316
316
  type: "object",
@@ -318,15 +318,15 @@ function execute(ctx, failure) {
318
318
  name: {
319
319
  type: "string",
320
320
  pattern: "^[a-z][a-z0-9_]*$",
321
- 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\""
321
+ description: "MUST use snake_case. Materialized views use \"mv_\" prefix."
322
322
  },
323
323
  description: {
324
324
  type: "string",
325
- 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...\""
325
+ description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax."
326
326
  },
327
327
  material: {
328
328
  type: "boolean",
329
- 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"
329
+ description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix."
330
330
  },
331
331
  stance: {
332
332
  oneOf: [
@@ -346,46 +346,46 @@ function execute(ctx, failure) {
346
346
  "const": "session"
347
347
  }
348
348
  ],
349
- 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"
349
+ 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."
350
350
  },
351
351
  primaryField: {
352
352
  $ref: "#/components/schemas/AutoBeDatabase.IPrimaryField",
353
- 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."
353
+ description: "Primary key field (UUID)."
354
354
  },
355
355
  foreignFields: {
356
356
  type: "array",
357
357
  items: {
358
358
  $ref: "#/components/schemas/AutoBeDatabase.IForeignField"
359
359
  },
360
- 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."
360
+ description: "Foreign key fields establishing relationships to other models."
361
361
  },
362
362
  plainFields: {
363
363
  type: "array",
364
364
  items: {
365
365
  $ref: "#/components/schemas/AutoBeDatabase.IPlainField"
366
366
  },
367
- 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."
367
+ description: "Regular data fields (names, timestamps, flags, amounts, etc.)."
368
368
  },
369
369
  uniqueIndexes: {
370
370
  type: "array",
371
371
  items: {
372
372
  $ref: "#/components/schemas/AutoBeDatabase.IUniqueIndex"
373
373
  },
374
- 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)."
374
+ description: "Unique indexes for data integrity constraints."
375
375
  },
376
376
  plainIndexes: {
377
377
  type: "array",
378
378
  items: {
379
379
  $ref: "#/components/schemas/AutoBeDatabase.IPlainIndex"
380
380
  },
381
- 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."
381
+ description: "Regular indexes for query performance."
382
382
  },
383
383
  ginIndexes: {
384
384
  type: "array",
385
385
  items: {
386
386
  $ref: "#/components/schemas/AutoBeDatabase.IGinIndex"
387
387
  },
388
- 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."
388
+ description: "GIN indexes for PostgreSQL full-text search (trigram)."
389
389
  }
390
390
  },
391
391
  required: [
@@ -400,7 +400,7 @@ function execute(ctx, failure) {
400
400
  "plainIndexes",
401
401
  "ginIndexes"
402
402
  ],
403
- 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_)"
403
+ description: "A single Prisma model (database table)."
404
404
  },
405
405
  "AutoBeDatabase.IPrimaryField": {
406
406
  type: "object",
@@ -408,15 +408,14 @@ function execute(ctx, failure) {
408
408
  name: {
409
409
  type: "string",
410
410
  pattern: "^[a-z][a-z0-9_]*$",
411
- 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."
411
+ description: "MUST use snake_case."
412
412
  },
413
413
  type: {
414
- "const": "uuid",
415
- 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."
414
+ "const": "uuid"
416
415
  },
417
416
  description: {
418
417
  type: "string",
419
- 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."
418
+ description: "Business purpose of this primary key. MUST be written in English."
420
419
  }
421
420
  },
422
421
  required: [
@@ -424,7 +423,7 @@ function execute(ctx, failure) {
424
423
  "type",
425
424
  "description"
426
425
  ],
427
- 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)."
426
+ description: "Primary key field of a model."
428
427
  },
429
428
  "AutoBeDatabase.IForeignField": {
430
429
  type: "object",
@@ -432,27 +431,26 @@ function execute(ctx, failure) {
432
431
  name: {
433
432
  type: "string",
434
433
  pattern: "^[a-z][a-z0-9_]*$",
435
- 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)"
434
+ description: "MUST use snake_case. Convention: \"{target_model}_id\"."
436
435
  },
437
436
  type: {
438
- "const": "uuid",
439
- 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."
437
+ "const": "uuid"
440
438
  },
441
439
  description: {
442
440
  type: "string",
443
- 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."
441
+ description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English."
444
442
  },
445
443
  relation: {
446
444
  $ref: "#/components/schemas/AutoBeDatabase.IRelation",
447
- 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."
445
+ description: "Prisma relation configuration."
448
446
  },
449
447
  unique: {
450
448
  type: "boolean",
451
- 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."
449
+ description: "True for 1:1 relationships, false for 1:N."
452
450
  },
453
451
  nullable: {
454
452
  type: "boolean",
455
- 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."
453
+ description: "True if the relationship is optional."
456
454
  }
457
455
  },
458
456
  required: [
@@ -463,7 +461,7 @@ function execute(ctx, failure) {
463
461
  "unique",
464
462
  "nullable"
465
463
  ],
466
- 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."
464
+ description: "Foreign key field establishing a relationship to another model."
467
465
  },
468
466
  "AutoBeDatabase.IRelation": {
469
467
  type: "object",
@@ -471,16 +469,16 @@ function execute(ctx, failure) {
471
469
  name: {
472
470
  type: "string",
473
471
  pattern: "^[a-z][a-zA-Z0-9]*$",
474
- 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"
472
+ description: "Relation property name in this model. MUST use camelCase."
475
473
  },
476
474
  targetModel: {
477
475
  type: "string",
478
- 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."
476
+ description: "Must match an existing model name in the schema."
479
477
  },
480
478
  oppositeName: {
481
479
  type: "string",
482
480
  pattern: "^[a-z][a-zA-Z0-9]*$",
483
- 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."
481
+ description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1."
484
482
  }
485
483
  },
486
484
  required: [
@@ -488,7 +486,7 @@ function execute(ctx, failure) {
488
486
  "targetModel",
489
487
  "oppositeName"
490
488
  ],
491
- 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)"
489
+ description: "Prisma"
492
490
  },
493
491
  "AutoBeDatabase.IPlainField": {
494
492
  type: "object",
@@ -496,7 +494,7 @@ function execute(ctx, failure) {
496
494
  name: {
497
495
  type: "string",
498
496
  pattern: "^[a-z][a-z0-9_]*$",
499
- 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"
497
+ description: "MUST use snake_case."
500
498
  },
501
499
  type: {
502
500
  oneOf: [
@@ -522,15 +520,15 @@ function execute(ctx, failure) {
522
520
  "const": "datetime"
523
521
  }
524
522
  ],
525
- 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"
523
+ description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime."
526
524
  },
527
525
  description: {
528
526
  type: "string",
529
- 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.\""
527
+ description: "Business purpose of this field. MUST be written in English."
530
528
  },
531
529
  nullable: {
532
530
  type: "boolean",
533
- 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."
531
+ description: "Whether this field can be null."
534
532
  }
535
533
  },
536
534
  required: [
@@ -539,7 +537,7 @@ function execute(ctx, failure) {
539
537
  "description",
540
538
  "nullable"
541
539
  ],
542
- 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."
540
+ description: "A regular data field (not a primary or foreign key)."
543
541
  },
544
542
  "AutoBeDatabase.IUniqueIndex": {
545
543
  type: "object",
@@ -551,18 +549,18 @@ function execute(ctx, failure) {
551
549
  },
552
550
  minItems: 1,
553
551
  uniqueItems: true,
554
- 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\"]"
552
+ description: "Field names forming the unique constraint. All must exist in the model."
555
553
  },
556
554
  unique: {
557
555
  "const": true,
558
- 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\"."
556
+ description: "Always true. Distinguishes from plain indexes."
559
557
  }
560
558
  },
561
559
  required: [
562
560
  "fieldNames",
563
561
  "unique"
564
562
  ],
565
- 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."
563
+ description: "Unique index constraint (@@unique)."
566
564
  },
567
565
  "AutoBeDatabase.IPlainIndex": {
568
566
  type: "object",
@@ -574,26 +572,26 @@ function execute(ctx, failure) {
574
572
  },
575
573
  minItems: 1,
576
574
  uniqueItems: true,
577
- 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\"]"
575
+ description: "Field names to index. Order matters for composite indexes."
578
576
  }
579
577
  },
580
578
  required: [
581
579
  "fieldNames"
582
580
  ],
583
- 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."
581
+ description: "Regular index for query performance (@@index)."
584
582
  },
585
583
  "AutoBeDatabase.IGinIndex": {
586
584
  type: "object",
587
585
  properties: {
588
586
  fieldName: {
589
587
  type: "string",
590
- 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."
588
+ description: "Must be a string field containing searchable text."
591
589
  }
592
590
  },
593
591
  required: [
594
592
  "fieldName"
595
593
  ],
596
- 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."
594
+ description: "GIN index for PostgreSQL full-text search (gin_trgm_ops)."
597
595
  }
598
596
  }
599
597
  },
@@ -611,7 +609,7 @@ function execute(ctx, failure) {
611
609
  }
612
610
  }
613
611
  ],
614
- description: "Process schema correction task or preliminary data requests.\n\nFixes validation errors in specific database models while preserving all\nbusiness logic and model descriptions. Returns ONLY corrected models."
612
+ description: "Process schema correction task or preliminary data requests."
615
613
  }
616
614
  ]
617
615
  },
@@ -1134,11 +1132,11 @@ function createController(props) {
1134
1132
  type: "object",
1135
1133
  properties: {
1136
1134
  thinking: {
1137
- 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.",
1135
+ 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.",
1138
1136
  type: "string"
1139
1137
  },
1140
1138
  request: {
1141
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisSections, getPreviousAnalysisSections, getDatabaseSchemas,\ngetPreviousDatabaseSchemas) or final schema correction (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
1139
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion, physically preventing repeated calls.",
1142
1140
  anyOf: [
1143
1141
  {
1144
1142
  $ref: "#/$defs/IAutoBePreliminaryGetAnalysisSections"
@@ -1175,18 +1173,18 @@ function createController(props) {
1175
1173
  additionalProperties: false,
1176
1174
  $defs: {
1177
1175
  IAutoBePreliminaryGetAnalysisSections: {
1178
- 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.",
1176
+ description: "Request to retrieve individual analysis sections by numeric ID.",
1179
1177
  type: "object",
1180
1178
  properties: {
1181
1179
  type: {
1182
- 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.",
1180
+ description: "Type discriminator.",
1183
1181
  type: "string",
1184
1182
  "enum": [
1185
1183
  "getAnalysisSections"
1186
1184
  ]
1187
1185
  },
1188
1186
  sectionIds: {
1189
- 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.",
1187
+ description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls.",
1190
1188
  type: "array",
1191
1189
  items: {
1192
1190
  type: "integer",
@@ -1202,18 +1200,18 @@ function createController(props) {
1202
1200
  ]
1203
1201
  },
1204
1202
  IAutoBePreliminaryGetDatabaseSchemas: {
1205
- description: "Request to retrieve database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific database table\nschemas needed for generating type-safe API operations.",
1203
+ description: "Request to retrieve database schema definitions for context.",
1206
1204
  type: "object",
1207
1205
  properties: {
1208
1206
  type: {
1209
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getDatabaseSchemas\" indicates this is a preliminary\ndata request for database schemas.",
1207
+ description: "Type discriminator.",
1210
1208
  type: "string",
1211
1209
  "enum": [
1212
1210
  "getDatabaseSchemas"
1213
1211
  ]
1214
1212
  },
1215
1213
  schemaNames: {
1216
- description: "List of database table names to retrieve.\n\nTable names from the database schema representing database entities (e.g.,\n\"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls.",
1214
+ description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls.",
1217
1215
  type: "array",
1218
1216
  items: {
1219
1217
  type: "string"
@@ -1227,18 +1225,18 @@ function createController(props) {
1227
1225
  ]
1228
1226
  },
1229
1227
  IAutoBePreliminaryGetPreviousAnalysisSections: {
1230
- 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.",
1228
+ description: "Request to retrieve analysis sections from the previous iteration by numeric\nID.",
1231
1229
  type: "object",
1232
1230
  properties: {
1233
1231
  type: {
1234
- description: "Type discriminator for the request.\n\nValue \"getPreviousAnalysisSections\" indicates this is a preliminary data\nrequest for analysis sections from the previous iteration.",
1232
+ description: "Type discriminator.",
1235
1233
  type: "string",
1236
1234
  "enum": [
1237
1235
  "getPreviousAnalysisSections"
1238
1236
  ]
1239
1237
  },
1240
1238
  sectionIds: {
1241
- 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.",
1239
+ description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls.",
1242
1240
  type: "array",
1243
1241
  items: {
1244
1242
  type: "integer",
@@ -1253,18 +1251,18 @@ function createController(props) {
1253
1251
  ]
1254
1252
  },
1255
1253
  IAutoBePreliminaryGetPreviousDatabaseSchemas: {
1256
- 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",
1254
+ 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.",
1257
1255
  type: "object",
1258
1256
  properties: {
1259
1257
  type: {
1260
- 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.",
1258
+ description: "Type discriminator.",
1261
1259
  type: "string",
1262
1260
  "enum": [
1263
1261
  "getPreviousDatabaseSchemas"
1264
1262
  ]
1265
1263
  },
1266
1264
  schemaNames: {
1267
- 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\"",
1265
+ description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls.",
1268
1266
  type: "array",
1269
1267
  items: {
1270
1268
  type: "string"
@@ -1278,22 +1276,22 @@ function createController(props) {
1278
1276
  ]
1279
1277
  },
1280
1278
  "IAutoBeDatabaseCorrectApplication.IComplete": {
1281
- description: "Request to fix validation errors in database models.\n\nExecutes targeted error correction to resolve specific validation issues in\naffected models only. Applies minimal changes while preserving original\ndesign intent and business logic.",
1279
+ description: "Fix validation errors in affected models only, preserving design intent and\nbusiness logic.",
1282
1280
  type: "object",
1283
1281
  properties: {
1284
1282
  type: {
1285
- 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.",
1283
+ description: "Type discriminator for completion request.",
1286
1284
  type: "string",
1287
1285
  "enum": [
1288
1286
  "complete"
1289
1287
  ]
1290
1288
  },
1291
1289
  planning: {
1292
- description: "Detailed execution plan for fixing validation errors.\n\nContains systematic reasoning and step-by-step error resolution approach\nfor targeted model validation issues.\n\nRequired planning content:\n\n1. Error scope analysis:\n\n - List all validation errors from IAutoBeDatabaseValidation.IError[]\n - Extract unique table names to identify affected models\n - Categorize errors by type (field duplications, references, types,\n indexes)\n - Identify which models need correction vs. remain unchanged\n2. Targeted fix strategy:\n\n - Focus ONLY on models mentioned in validation errors\n - Outline minimal changes needed for each affected model\n - Plan cross-model reference updates without modifying non-error models\n - Ensure unchanged models maintain valid references to corrected models\n3. Model-specific fix plan:\n\n - Model-by-model modification plan for ONLY affected models\n - Exact field additions, renames, or type corrections required\n - Reference updates within corrected models only\n - Index corrections limited to affected models\n4. Minimal scope validation:\n\n - Confirm which models will be included in output (error models only)\n - List models that will remain unchanged in original schema\n - Identify cross-model dependencies without including unchanged models\n - Preserve all business logic within corrected models\n5. Targeted impact assessment:\n\n - Potential effects of fixes on unchanged models (reference validation)\n - Verification points for corrected models only\n - Ensure no new validation errors in targeted models\n - Confirm minimal output scope compliance",
1290
+ description: "Execution plan for fixing validation errors. Required steps:\n\n1. Error scope analysis \u2014 list all validation errors, extract affected table\n names, categorize by type (duplications, references, types, indexes)\n2. Targeted fix strategy \u2014 focus ONLY on models in errors, outline minimal\n changes per model\n3. Model-specific fix plan \u2014 detail corrections per affected model\n4. Minimal scope validation \u2014 confirm which models are in/out of output\n5. Targeted impact assessment \u2014 verify fixes don't break references from\n unchanged models\n\nPreserve all business logic and cross-model references.",
1293
1291
  type: "string"
1294
1292
  },
1295
1293
  models: {
1296
- description: "Models with validation errors that need correction.\n\nContains ONLY models mentioned in IAutoBeDatabaseValidation.IError[]\narray. Each model has specific validation errors requiring targeted\ncorrection. Models not mentioned in errors are excluded from this input.\n\nExpected validation issues:\n\n- Duplicate field/relation names within these specific models\n- Invalid foreign key references from these models to other models\n- Single foreign key fields in index arrays within these models\n- Invalid naming conventions within these specific models\n- Type validation errors in fields of these models\n\nModel content analysis:\n\n- Complete field definitions for each error model only\n- Relationships from these models (may reference unchanged models)\n- Indexes within these models that need correction\n- Business descriptions specific to these models\n- Cross-model references that need validation (read-only for targets)\n\nProcessing notes:\n\n- Input contains ONLY models with validation errors\n- May reference other models not included in this input\n- Cross-model references must be validated but target models won't be\n modified\n- Output should return corrected versions of ONLY these input models\n- All business logic and descriptions within these models must be preserved\n- Corrections must not break references from unchanged models",
1294
+ description: "Models with validation errors that need correction.\n\nContains ONLY models from IAutoBeDatabaseValidation.IError[]. Output\ncorrected versions of these models only. Cross-model references must stay\nvalid but target models are not modified.",
1297
1295
  type: "array",
1298
1296
  items: {
1299
1297
  $ref: "#/$defs/AutoBeDatabase.IModel"
@@ -1307,24 +1305,24 @@ function createController(props) {
1307
1305
  ]
1308
1306
  },
1309
1307
  "AutoBeDatabase.IModel": {
1310
- 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_)",
1308
+ description: "A single Prisma model (database table).",
1311
1309
  type: "object",
1312
1310
  properties: {
1313
1311
  name: {
1314
- 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\"",
1312
+ description: "MUST use snake_case. Materialized views use \"mv_\" prefix.",
1315
1313
  type: "string",
1316
1314
  pattern: "^[a-z][a-z0-9_]*$"
1317
1315
  },
1318
1316
  description: {
1319
- 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...\"",
1317
+ description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax.",
1320
1318
  type: "string"
1321
1319
  },
1322
1320
  material: {
1323
- 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",
1321
+ description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix.",
1324
1322
  type: "boolean"
1325
1323
  },
1326
1324
  stance: {
1327
- 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",
1325
+ 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.",
1328
1326
  type: "string",
1329
1327
  "enum": [
1330
1328
  "primary",
@@ -1335,39 +1333,39 @@ function createController(props) {
1335
1333
  ]
1336
1334
  },
1337
1335
  primaryField: {
1338
- 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.",
1336
+ description: "Primary key field (UUID).",
1339
1337
  $ref: "#/$defs/AutoBeDatabase.IPrimaryField"
1340
1338
  },
1341
1339
  foreignFields: {
1342
- 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.",
1340
+ description: "Foreign key fields establishing relationships to other models.",
1343
1341
  type: "array",
1344
1342
  items: {
1345
1343
  $ref: "#/$defs/AutoBeDatabase.IForeignField"
1346
1344
  }
1347
1345
  },
1348
1346
  plainFields: {
1349
- 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.",
1347
+ description: "Regular data fields (names, timestamps, flags, amounts, etc.).",
1350
1348
  type: "array",
1351
1349
  items: {
1352
1350
  $ref: "#/$defs/AutoBeDatabase.IPlainField"
1353
1351
  }
1354
1352
  },
1355
1353
  uniqueIndexes: {
1356
- 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).",
1354
+ description: "Unique indexes for data integrity constraints.",
1357
1355
  type: "array",
1358
1356
  items: {
1359
1357
  $ref: "#/$defs/AutoBeDatabase.IUniqueIndex"
1360
1358
  }
1361
1359
  },
1362
1360
  plainIndexes: {
1363
- 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.",
1361
+ description: "Regular indexes for query performance.",
1364
1362
  type: "array",
1365
1363
  items: {
1366
1364
  $ref: "#/$defs/AutoBeDatabase.IPlainIndex"
1367
1365
  }
1368
1366
  },
1369
1367
  ginIndexes: {
1370
- 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.",
1368
+ description: "GIN indexes for PostgreSQL full-text search (trigram).",
1371
1369
  type: "array",
1372
1370
  items: {
1373
1371
  $ref: "#/$defs/AutoBeDatabase.IGinIndex"
@@ -1388,23 +1386,22 @@ function createController(props) {
1388
1386
  ]
1389
1387
  },
1390
1388
  "AutoBeDatabase.IPrimaryField": {
1391
- 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).",
1389
+ description: "Primary key field of a model.",
1392
1390
  type: "object",
1393
1391
  properties: {
1394
1392
  name: {
1395
- 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.",
1393
+ description: "MUST use snake_case.",
1396
1394
  type: "string",
1397
1395
  pattern: "^[a-z][a-z0-9_]*$"
1398
1396
  },
1399
1397
  type: {
1400
- 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.",
1401
1398
  type: "string",
1402
1399
  "enum": [
1403
1400
  "uuid"
1404
1401
  ]
1405
1402
  },
1406
1403
  description: {
1407
- 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.",
1404
+ description: "Business purpose of this primary key. MUST be written in English.",
1408
1405
  type: "string"
1409
1406
  }
1410
1407
  },
@@ -1415,35 +1412,34 @@ function createController(props) {
1415
1412
  ]
1416
1413
  },
1417
1414
  "AutoBeDatabase.IForeignField": {
1418
- 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.",
1415
+ description: "Foreign key field establishing a relationship to another model.",
1419
1416
  type: "object",
1420
1417
  properties: {
1421
1418
  name: {
1422
- 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)",
1419
+ description: "MUST use snake_case. Convention: \"{target_model}_id\".",
1423
1420
  type: "string",
1424
1421
  pattern: "^[a-z][a-z0-9_]*$"
1425
1422
  },
1426
1423
  type: {
1427
- 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.",
1428
1424
  type: "string",
1429
1425
  "enum": [
1430
1426
  "uuid"
1431
1427
  ]
1432
1428
  },
1433
1429
  description: {
1434
- 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.",
1430
+ description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English.",
1435
1431
  type: "string"
1436
1432
  },
1437
1433
  relation: {
1438
- 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.",
1434
+ description: "Prisma relation configuration.",
1439
1435
  $ref: "#/$defs/AutoBeDatabase.IRelation"
1440
1436
  },
1441
1437
  unique: {
1442
- 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.",
1438
+ description: "True for 1:1 relationships, false for 1:N.",
1443
1439
  type: "boolean"
1444
1440
  },
1445
1441
  nullable: {
1446
- 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.",
1442
+ description: "True if the relationship is optional.",
1447
1443
  type: "boolean"
1448
1444
  }
1449
1445
  },
@@ -1457,20 +1453,20 @@ function createController(props) {
1457
1453
  ]
1458
1454
  },
1459
1455
  "AutoBeDatabase.IRelation": {
1460
- 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)",
1456
+ description: "Prisma",
1461
1457
  type: "object",
1462
1458
  properties: {
1463
1459
  name: {
1464
- 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",
1460
+ description: "Relation property name in this model. MUST use camelCase.",
1465
1461
  type: "string",
1466
1462
  pattern: "^[a-z][a-zA-Z0-9]*$"
1467
1463
  },
1468
1464
  targetModel: {
1469
- 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.",
1465
+ description: "Must match an existing model name in the schema.",
1470
1466
  type: "string"
1471
1467
  },
1472
1468
  oppositeName: {
1473
- 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.",
1469
+ description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1.",
1474
1470
  type: "string",
1475
1471
  pattern: "^[a-z][a-zA-Z0-9]*$"
1476
1472
  }
@@ -1482,16 +1478,16 @@ function createController(props) {
1482
1478
  ]
1483
1479
  },
1484
1480
  "AutoBeDatabase.IPlainField": {
1485
- 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.",
1481
+ description: "A regular data field (not a primary or foreign key).",
1486
1482
  type: "object",
1487
1483
  properties: {
1488
1484
  name: {
1489
- 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",
1485
+ description: "MUST use snake_case.",
1490
1486
  type: "string",
1491
1487
  pattern: "^[a-z][a-z0-9_]*$"
1492
1488
  },
1493
1489
  type: {
1494
- 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",
1490
+ description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime.",
1495
1491
  type: "string",
1496
1492
  "enum": [
1497
1493
  "string",
@@ -1504,11 +1500,11 @@ function createController(props) {
1504
1500
  ]
1505
1501
  },
1506
1502
  description: {
1507
- 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.\"",
1503
+ description: "Business purpose of this field. MUST be written in English.",
1508
1504
  type: "string"
1509
1505
  },
1510
1506
  nullable: {
1511
- 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.",
1507
+ description: "Whether this field can be null.",
1512
1508
  type: "boolean"
1513
1509
  }
1514
1510
  },
@@ -1520,11 +1516,11 @@ function createController(props) {
1520
1516
  ]
1521
1517
  },
1522
1518
  "AutoBeDatabase.IUniqueIndex": {
1523
- 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.",
1519
+ description: "Unique index constraint (@@unique).",
1524
1520
  type: "object",
1525
1521
  properties: {
1526
1522
  fieldNames: {
1527
- 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\"]",
1523
+ description: "Field names forming the unique constraint. All must exist in the model.",
1528
1524
  type: "array",
1529
1525
  items: {
1530
1526
  type: "string"
@@ -1533,7 +1529,7 @@ function createController(props) {
1533
1529
  uniqueItems: true
1534
1530
  },
1535
1531
  unique: {
1536
- 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\".",
1532
+ description: "Always true. Distinguishes from plain indexes.",
1537
1533
  type: "boolean",
1538
1534
  "enum": [
1539
1535
  true
@@ -1546,11 +1542,11 @@ function createController(props) {
1546
1542
  ]
1547
1543
  },
1548
1544
  "AutoBeDatabase.IPlainIndex": {
1549
- 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.",
1545
+ description: "Regular index for query performance (@@index).",
1550
1546
  type: "object",
1551
1547
  properties: {
1552
1548
  fieldNames: {
1553
- 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\"]",
1549
+ description: "Field names to index. Order matters for composite indexes.",
1554
1550
  type: "array",
1555
1551
  items: {
1556
1552
  type: "string"
@@ -1564,11 +1560,11 @@ function createController(props) {
1564
1560
  ]
1565
1561
  },
1566
1562
  "AutoBeDatabase.IGinIndex": {
1567
- 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.",
1563
+ description: "GIN index for PostgreSQL full-text search (gin_trgm_ops).",
1568
1564
  type: "object",
1569
1565
  properties: {
1570
1566
  fieldName: {
1571
- 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.",
1567
+ description: "Must be a string field containing searchable text.",
1572
1568
  type: "string"
1573
1569
  }
1574
1570
  },
@@ -1578,7 +1574,7 @@ function createController(props) {
1578
1574
  }
1579
1575
  }
1580
1576
  },
1581
- description: "Process schema correction task or preliminary data requests.\n\nFixes validation errors in specific database models while preserving all\nbusiness logic and model descriptions. Returns ONLY corrected models.",
1577
+ description: "Process schema correction task or preliminary data requests.",
1582
1578
  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 => "getDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io3 = 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 _io4 = input => "getPreviousDatabaseSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io5 = input => "complete" === input.type && "string" === typeof input.planning && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io6(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 _iu0 = input => (() => {
1583
1579
  if ("getAnalysisSections" === input.type)
1584
1580
  return _io1(input);