@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
@@ -103,7 +103,7 @@ function step(ctx, props) {
103
103
  properties: {
104
104
  thinking: {
105
105
  type: "string",
106
- 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."
106
+ description: "Reasoning about your current state: what's missing (preliminary) or what\nyou accomplished (completion)."
107
107
  },
108
108
  request: {
109
109
  oneOf: [
@@ -133,7 +133,7 @@ function step(ctx, props) {
133
133
  complete: "#/components/schemas/IAutoBeDatabaseSchemaReviewApplication.IComplete"
134
134
  }
135
135
  },
136
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisSections, getPreviousAnalysisSections, getDatabaseSchemas,\ngetPreviousDatabaseSchemas) or final schema review (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls."
136
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion."
137
137
  }
138
138
  },
139
139
  required: [
@@ -146,7 +146,7 @@ function step(ctx, props) {
146
146
  properties: {
147
147
  type: {
148
148
  "const": "getAnalysisSections",
149
- 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."
149
+ description: "Type discriminator."
150
150
  },
151
151
  sectionIds: {
152
152
  type: "array",
@@ -156,21 +156,21 @@ function step(ctx, props) {
156
156
  },
157
157
  minItems: 1,
158
158
  maxItems: 100,
159
- 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."
159
+ description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls."
160
160
  }
161
161
  },
162
162
  required: [
163
163
  "type",
164
164
  "sectionIds"
165
165
  ],
166
- 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."
166
+ description: "Request to retrieve individual analysis sections by numeric ID."
167
167
  },
168
168
  IAutoBePreliminaryGetDatabaseSchemas: {
169
169
  type: "object",
170
170
  properties: {
171
171
  type: {
172
172
  "const": "getDatabaseSchemas",
173
- 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."
173
+ description: "Type discriminator."
174
174
  },
175
175
  schemaNames: {
176
176
  type: "array",
@@ -178,21 +178,21 @@ function step(ctx, props) {
178
178
  type: "string"
179
179
  },
180
180
  minItems: 1,
181
- 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."
181
+ description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls."
182
182
  }
183
183
  },
184
184
  required: [
185
185
  "type",
186
186
  "schemaNames"
187
187
  ],
188
- 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."
188
+ description: "Request to retrieve database schema definitions for context."
189
189
  },
190
190
  IAutoBePreliminaryGetPreviousAnalysisSections: {
191
191
  type: "object",
192
192
  properties: {
193
193
  type: {
194
194
  "const": "getPreviousAnalysisSections",
195
- description: "Type discriminator for the request.\n\nValue \"getPreviousAnalysisSections\" indicates this is a preliminary data\nrequest for analysis sections from the previous iteration."
195
+ description: "Type discriminator."
196
196
  },
197
197
  sectionIds: {
198
198
  type: "array",
@@ -201,21 +201,21 @@ function step(ctx, props) {
201
201
  minimum: 0
202
202
  },
203
203
  minItems: 1,
204
- 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."
204
+ description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls."
205
205
  }
206
206
  },
207
207
  required: [
208
208
  "type",
209
209
  "sectionIds"
210
210
  ],
211
- 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."
211
+ description: "Request to retrieve analysis sections from the previous iteration by numeric\nID."
212
212
  },
213
213
  IAutoBePreliminaryGetPreviousDatabaseSchemas: {
214
214
  type: "object",
215
215
  properties: {
216
216
  type: {
217
217
  "const": "getPreviousDatabaseSchemas",
218
- 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."
218
+ description: "Type discriminator."
219
219
  },
220
220
  schemaNames: {
221
221
  type: "array",
@@ -223,29 +223,29 @@ function step(ctx, props) {
223
223
  type: "string"
224
224
  },
225
225
  minItems: 1,
226
- 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\""
226
+ description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls."
227
227
  }
228
228
  },
229
229
  required: [
230
230
  "type",
231
231
  "schemaNames"
232
232
  ],
233
- 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"
233
+ 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."
234
234
  },
235
235
  "IAutoBeDatabaseSchemaReviewApplication.IComplete": {
236
236
  type: "object",
237
237
  properties: {
238
238
  type: {
239
239
  "const": "complete",
240
- 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."
240
+ description: "Type discriminator for completion request."
241
241
  },
242
242
  review: {
243
243
  type: "string",
244
- description: "Comprehensive review analysis of the schema.\n\nContains detailed evaluation of the schema design including:\n\n- Normalization validation: Confirms 3NF compliance and proper data\n structure\n- Relationship integrity: Validates foreign key references and cardinality\n- Performance optimization: Reviews indexing strategy and query patterns\n- Business logic alignment: Ensures schema supports all use cases\n- Naming conventions: Verifies consistent naming patterns\n- Data type consistency: Confirms appropriate field types\n- Temporal field handling: Validates audit trail implementation\n\nThe review identifies potential issues and confirms adherence to best\npractices before final implementation."
244
+ description: "Review analysis covering normalization, relationships, indexes, naming,\nand business alignment."
245
245
  },
246
246
  plan: {
247
247
  type: "string",
248
- description: "Strategic database design plan.\n\nContains the original planning document outlining the database\narchitecture strategy including table structures, relationships,\nnormalization approach, and business requirement mapping. This plan\nserves as the blueprint for validating the implemented schema.\n\nPlanning components:\n\n- Business requirements: Mapping of business needs to database structures\n- Table design: Entity definitions and attribute specifications\n- Relationship strategy: Cardinality and referential integrity planning\n- Normalization approach: Application of 1NF, 2NF, 3NF principles\n- Performance considerations: Index strategy and query optimization\n- Snapshot architecture: Temporal data handling and audit requirements\n- Materialized views: Denormalization strategy for performance"
248
+ description: "Database design plan serving as the blueprint for validating the\nimplemented schema."
249
249
  },
250
250
  content: {
251
251
  oneOf: [
@@ -256,7 +256,7 @@ function step(ctx, props) {
256
256
  $ref: "#/components/schemas/AutoBeDatabaseSchemaDefinition"
257
257
  }
258
258
  ],
259
- description: "Corrected schema definition based on review feedback, or null if no\nchanges are needed.\n\nWhen not null, the definition carries exactly one corrected\n{@link AutoBeDatabaseSchemaDefinition.model} for the reviewed target table\nso that the output stays within the LLM's maximum output token limit. If\nthe review determines that additional child tables are required (e.g. 1NF\ndecomposition), they are declared in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as lightweight name +\ndescription pairs and will be generated by their own dedicated pipeline\ncalls.\n\nIf null, the original model remains unchanged from the original schema.\nIf not null, the modification must resolve issues identified in the\nreview."
259
+ description: "Corrected schema definition, or null if no changes are needed.\n\nWhen not null, carries exactly one corrected\n{@link AutoBeDatabaseSchemaDefinition.model}. Additional child tables go\nin {@link AutoBeDatabaseSchemaDefinition.newDesigns}."
260
260
  }
261
261
  },
262
262
  required: [
@@ -265,28 +265,28 @@ function step(ctx, props) {
265
265
  "plan",
266
266
  "content"
267
267
  ],
268
- description: "Request to review and refine database schema models.\n\nExecutes comprehensive schema review to validate design quality and\nidentify necessary improvements for normalization, relationships, and\nperformance optimization."
268
+ description: "Review and refine database schema models for normalization, relationships,\nand performance."
269
269
  },
270
270
  AutoBeDatabaseSchemaDefinition: {
271
271
  type: "object",
272
272
  properties: {
273
273
  model: {
274
274
  $ref: "#/components/schemas/AutoBeDatabase.IModel",
275
- description: "The single database table model produced by this call.\n\nAlways represents the target table that was assigned to the agent. Limiting\nthe output to one model prevents the response from exceeding the LLM's\nmaximum output token budget."
275
+ description: "The single database table model produced by this call."
276
276
  },
277
277
  newDesigns: {
278
278
  type: "array",
279
279
  items: {
280
280
  $ref: "#/components/schemas/AutoBeDatabaseComponentTableDesign"
281
281
  },
282
- description: "Lightweight designs for additional tables discovered during generation or\nreview.\n\nWhen the agent determines that 1NF decomposition or other normalization\nrequires child tables that do not yet exist, it declares them here as\nname+description pairs rather than full model definitions.\n\nThese designs are fed back into the schema generation pipeline so that each\nnew table is produced by its own dedicated call."
282
+ description: "Name+description pairs for child tables discovered during generation (1NF\ndecomposition, junction tables, etc.). Each feeds back into the pipeline as\na separate generation call."
283
283
  }
284
284
  },
285
285
  required: [
286
286
  "model",
287
287
  "newDesigns"
288
288
  ],
289
- description: "Database schema definition produced by a single schema generation or review\ncall.\n\nEach AI function call outputs exactly one target table model together with a\nlist of newly discovered table designs. The single-model constraint keeps the\noutput payload small enough to fit within the LLM's maximum output token\nlimit, while `newDesigns` lets the agent declare additional tables that\nshould be generated in subsequent calls through the normal pipeline."
289
+ description: "Output of a single schema generation or review call.\n\nOne target table model + lightweight designs for newly discovered child\ntables. Single-model constraint keeps output within LLM token budget."
290
290
  },
291
291
  "AutoBeDatabase.IModel": {
292
292
  type: "object",
@@ -294,15 +294,15 @@ function step(ctx, props) {
294
294
  name: {
295
295
  type: "string",
296
296
  pattern: "^[a-z][a-z0-9_]*$",
297
- 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\""
297
+ description: "MUST use snake_case. Materialized views use \"mv_\" prefix."
298
298
  },
299
299
  description: {
300
300
  type: "string",
301
- 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...\""
301
+ description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax."
302
302
  },
303
303
  material: {
304
304
  type: "boolean",
305
- 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"
305
+ description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix."
306
306
  },
307
307
  stance: {
308
308
  oneOf: [
@@ -322,46 +322,46 @@ function step(ctx, props) {
322
322
  "const": "session"
323
323
  }
324
324
  ],
325
- 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"
325
+ 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."
326
326
  },
327
327
  primaryField: {
328
328
  $ref: "#/components/schemas/AutoBeDatabase.IPrimaryField",
329
- 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."
329
+ description: "Primary key field (UUID)."
330
330
  },
331
331
  foreignFields: {
332
332
  type: "array",
333
333
  items: {
334
334
  $ref: "#/components/schemas/AutoBeDatabase.IForeignField"
335
335
  },
336
- 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."
336
+ description: "Foreign key fields establishing relationships to other models."
337
337
  },
338
338
  plainFields: {
339
339
  type: "array",
340
340
  items: {
341
341
  $ref: "#/components/schemas/AutoBeDatabase.IPlainField"
342
342
  },
343
- 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."
343
+ description: "Regular data fields (names, timestamps, flags, amounts, etc.)."
344
344
  },
345
345
  uniqueIndexes: {
346
346
  type: "array",
347
347
  items: {
348
348
  $ref: "#/components/schemas/AutoBeDatabase.IUniqueIndex"
349
349
  },
350
- 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)."
350
+ description: "Unique indexes for data integrity constraints."
351
351
  },
352
352
  plainIndexes: {
353
353
  type: "array",
354
354
  items: {
355
355
  $ref: "#/components/schemas/AutoBeDatabase.IPlainIndex"
356
356
  },
357
- 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."
357
+ description: "Regular indexes for query performance."
358
358
  },
359
359
  ginIndexes: {
360
360
  type: "array",
361
361
  items: {
362
362
  $ref: "#/components/schemas/AutoBeDatabase.IGinIndex"
363
363
  },
364
- 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."
364
+ description: "GIN indexes for PostgreSQL full-text search (trigram)."
365
365
  }
366
366
  },
367
367
  required: [
@@ -376,7 +376,7 @@ function step(ctx, props) {
376
376
  "plainIndexes",
377
377
  "ginIndexes"
378
378
  ],
379
- 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_)"
379
+ description: "A single Prisma model (database table)."
380
380
  },
381
381
  "AutoBeDatabase.IPrimaryField": {
382
382
  type: "object",
@@ -384,15 +384,14 @@ function step(ctx, props) {
384
384
  name: {
385
385
  type: "string",
386
386
  pattern: "^[a-z][a-z0-9_]*$",
387
- 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."
387
+ description: "MUST use snake_case."
388
388
  },
389
389
  type: {
390
- "const": "uuid",
391
- 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."
390
+ "const": "uuid"
392
391
  },
393
392
  description: {
394
393
  type: "string",
395
- 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."
394
+ description: "Business purpose of this primary key. MUST be written in English."
396
395
  }
397
396
  },
398
397
  required: [
@@ -400,7 +399,7 @@ function step(ctx, props) {
400
399
  "type",
401
400
  "description"
402
401
  ],
403
- 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)."
402
+ description: "Primary key field of a model."
404
403
  },
405
404
  "AutoBeDatabase.IForeignField": {
406
405
  type: "object",
@@ -408,27 +407,26 @@ function step(ctx, props) {
408
407
  name: {
409
408
  type: "string",
410
409
  pattern: "^[a-z][a-z0-9_]*$",
411
- 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)"
410
+ description: "MUST use snake_case. Convention: \"{target_model}_id\"."
412
411
  },
413
412
  type: {
414
- "const": "uuid",
415
- 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."
413
+ "const": "uuid"
416
414
  },
417
415
  description: {
418
416
  type: "string",
419
- 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."
417
+ description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English."
420
418
  },
421
419
  relation: {
422
420
  $ref: "#/components/schemas/AutoBeDatabase.IRelation",
423
- 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."
421
+ description: "Prisma relation configuration."
424
422
  },
425
423
  unique: {
426
424
  type: "boolean",
427
- 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."
425
+ description: "True for 1:1 relationships, false for 1:N."
428
426
  },
429
427
  nullable: {
430
428
  type: "boolean",
431
- 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."
429
+ description: "True if the relationship is optional."
432
430
  }
433
431
  },
434
432
  required: [
@@ -439,7 +437,7 @@ function step(ctx, props) {
439
437
  "unique",
440
438
  "nullable"
441
439
  ],
442
- 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."
440
+ description: "Foreign key field establishing a relationship to another model."
443
441
  },
444
442
  "AutoBeDatabase.IRelation": {
445
443
  type: "object",
@@ -447,16 +445,16 @@ function step(ctx, props) {
447
445
  name: {
448
446
  type: "string",
449
447
  pattern: "^[a-z][a-zA-Z0-9]*$",
450
- 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"
448
+ description: "Relation property name in this model. MUST use camelCase."
451
449
  },
452
450
  targetModel: {
453
451
  type: "string",
454
- 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."
452
+ description: "Must match an existing model name in the schema."
455
453
  },
456
454
  oppositeName: {
457
455
  type: "string",
458
456
  pattern: "^[a-z][a-zA-Z0-9]*$",
459
- 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."
457
+ description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1."
460
458
  }
461
459
  },
462
460
  required: [
@@ -464,7 +462,7 @@ function step(ctx, props) {
464
462
  "targetModel",
465
463
  "oppositeName"
466
464
  ],
467
- 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)"
465
+ description: "Prisma"
468
466
  },
469
467
  "AutoBeDatabase.IPlainField": {
470
468
  type: "object",
@@ -472,7 +470,7 @@ function step(ctx, props) {
472
470
  name: {
473
471
  type: "string",
474
472
  pattern: "^[a-z][a-z0-9_]*$",
475
- 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"
473
+ description: "MUST use snake_case."
476
474
  },
477
475
  type: {
478
476
  oneOf: [
@@ -498,15 +496,15 @@ function step(ctx, props) {
498
496
  "const": "datetime"
499
497
  }
500
498
  ],
501
- 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"
499
+ description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime."
502
500
  },
503
501
  description: {
504
502
  type: "string",
505
- 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.\""
503
+ description: "Business purpose of this field. MUST be written in English."
506
504
  },
507
505
  nullable: {
508
506
  type: "boolean",
509
- 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."
507
+ description: "Whether this field can be null."
510
508
  }
511
509
  },
512
510
  required: [
@@ -515,7 +513,7 @@ function step(ctx, props) {
515
513
  "description",
516
514
  "nullable"
517
515
  ],
518
- 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."
516
+ description: "A regular data field (not a primary or foreign key)."
519
517
  },
520
518
  "AutoBeDatabase.IUniqueIndex": {
521
519
  type: "object",
@@ -527,18 +525,18 @@ function step(ctx, props) {
527
525
  },
528
526
  minItems: 1,
529
527
  uniqueItems: true,
530
- 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\"]"
528
+ description: "Field names forming the unique constraint. All must exist in the model."
531
529
  },
532
530
  unique: {
533
531
  "const": true,
534
- 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\"."
532
+ description: "Always true. Distinguishes from plain indexes."
535
533
  }
536
534
  },
537
535
  required: [
538
536
  "fieldNames",
539
537
  "unique"
540
538
  ],
541
- 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."
539
+ description: "Unique index constraint (@@unique)."
542
540
  },
543
541
  "AutoBeDatabase.IPlainIndex": {
544
542
  type: "object",
@@ -550,45 +548,45 @@ function step(ctx, props) {
550
548
  },
551
549
  minItems: 1,
552
550
  uniqueItems: true,
553
- 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\"]"
551
+ description: "Field names to index. Order matters for composite indexes."
554
552
  }
555
553
  },
556
554
  required: [
557
555
  "fieldNames"
558
556
  ],
559
- 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."
557
+ description: "Regular index for query performance (@@index)."
560
558
  },
561
559
  "AutoBeDatabase.IGinIndex": {
562
560
  type: "object",
563
561
  properties: {
564
562
  fieldName: {
565
563
  type: "string",
566
- 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."
564
+ description: "Must be a string field containing searchable text."
567
565
  }
568
566
  },
569
567
  required: [
570
568
  "fieldName"
571
569
  ],
572
- 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."
570
+ description: "GIN index for PostgreSQL full-text search (gin_trgm_ops)."
573
571
  },
574
572
  AutoBeDatabaseComponentTableDesign: {
575
573
  type: "object",
576
574
  properties: {
577
575
  description: {
578
576
  type: "string",
579
- description: "Brief, concise description of what this table stores and why it's needed.\n\nShould explain:\n\n- What business concept this table represents\n- What data it stores\n- Why this table is necessary for the component's domain\n\n**IMPORTANT**:\n\n- Keep it **concise** - one or two sentences maximum\n- Description must be written in English"
577
+ description: "Business purpose of this table. One or two sentences maximum. MUST be\nwritten in English."
580
578
  },
581
579
  name: {
582
580
  type: "string",
583
581
  pattern: "^[a-z][a-z0-9_]*$",
584
- description: "Name of the database table.\n\nMust follow snake_case naming convention with appropriate domain prefix.\nExamples: `shopping_customers`, `bbs_articles`, `order_items`"
582
+ description: "Table name in snake_case with domain prefix (e.g., \"shopping_customers\")."
585
583
  }
586
584
  },
587
585
  required: [
588
586
  "description",
589
587
  "name"
590
588
  ],
591
- description: "Table design with name and description.\n\nRepresents a single table identified during the component extraction phase,\npairing the table name with a description of its purpose. This type\nformalizes the table design structure for database schema generation.\n\nThe description provides business context that helps:\n\n- Review agents validate that the table fulfills actual requirements\n- Schema generation create appropriate models with proper documentation\n- Future developers understand the table's role in the system"
589
+ description: "Table design with name and description."
592
590
  }
593
591
  }
594
592
  },
@@ -599,14 +597,13 @@ function step(ctx, props) {
599
597
  parameters: [
600
598
  {
601
599
  name: "props",
602
- description: " Request containing either preliminary data request or complete\ntask",
603
600
  required: true,
604
601
  schema: {
605
602
  $ref: "#/components/schemas/IAutoBeDatabaseSchemaReviewApplication.IProps"
606
603
  }
607
604
  }
608
605
  ],
609
- description: "Process schema review task or preliminary data requests.\n\nReviews generated database models to validate normalization, relationships,\nindexes, and business alignment, producing necessary modifications."
606
+ description: "Process schema review task or retrieve preliminary data."
610
607
  }
611
608
  ]
612
609
  },
@@ -1169,11 +1166,11 @@ function createController(props) {
1169
1166
  type: "object",
1170
1167
  properties: {
1171
1168
  thinking: {
1172
- 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.",
1169
+ description: "Reasoning about your current state: what's missing (preliminary) or what\nyou accomplished (completion).",
1173
1170
  type: "string"
1174
1171
  },
1175
1172
  request: {
1176
- description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisSections, getPreviousAnalysisSections, getDatabaseSchemas,\ngetPreviousDatabaseSchemas) or final schema review (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
1173
+ description: "Action to perform. Exhausted preliminary types are removed from the\nunion.",
1177
1174
  anyOf: [
1178
1175
  {
1179
1176
  $ref: "#/$defs/IAutoBePreliminaryGetAnalysisSections"
@@ -1210,18 +1207,18 @@ function createController(props) {
1210
1207
  additionalProperties: false,
1211
1208
  $defs: {
1212
1209
  IAutoBePreliminaryGetAnalysisSections: {
1213
- 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.",
1210
+ description: "Request to retrieve individual analysis sections by numeric ID.",
1214
1211
  type: "object",
1215
1212
  properties: {
1216
1213
  type: {
1217
- 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.",
1214
+ description: "Type discriminator.",
1218
1215
  type: "string",
1219
1216
  "enum": [
1220
1217
  "getAnalysisSections"
1221
1218
  ]
1222
1219
  },
1223
1220
  sectionIds: {
1224
- 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.",
1221
+ description: "Section IDs to retrieve. DO NOT request same IDs already requested in\nprevious calls.",
1225
1222
  type: "array",
1226
1223
  items: {
1227
1224
  type: "integer",
@@ -1237,18 +1234,18 @@ function createController(props) {
1237
1234
  ]
1238
1235
  },
1239
1236
  IAutoBePreliminaryGetDatabaseSchemas: {
1240
- 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.",
1237
+ description: "Request to retrieve database schema definitions for context.",
1241
1238
  type: "object",
1242
1239
  properties: {
1243
1240
  type: {
1244
- 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.",
1241
+ description: "Type discriminator.",
1245
1242
  type: "string",
1246
1243
  "enum": [
1247
1244
  "getDatabaseSchemas"
1248
1245
  ]
1249
1246
  },
1250
1247
  schemaNames: {
1251
- 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.",
1248
+ description: "Database table names to retrieve. DO NOT request same names already\nrequested in previous calls.",
1252
1249
  type: "array",
1253
1250
  items: {
1254
1251
  type: "string"
@@ -1262,18 +1259,18 @@ function createController(props) {
1262
1259
  ]
1263
1260
  },
1264
1261
  IAutoBePreliminaryGetPreviousAnalysisSections: {
1265
- 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.",
1262
+ description: "Request to retrieve analysis sections from the previous iteration by numeric\nID.",
1266
1263
  type: "object",
1267
1264
  properties: {
1268
1265
  type: {
1269
- description: "Type discriminator for the request.\n\nValue \"getPreviousAnalysisSections\" indicates this is a preliminary data\nrequest for analysis sections from the previous iteration.",
1266
+ description: "Type discriminator.",
1270
1267
  type: "string",
1271
1268
  "enum": [
1272
1269
  "getPreviousAnalysisSections"
1273
1270
  ]
1274
1271
  },
1275
1272
  sectionIds: {
1276
- 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.",
1273
+ description: "Section IDs to retrieve from previous iteration. DO NOT request same IDs\nalready requested in previous calls.",
1277
1274
  type: "array",
1278
1275
  items: {
1279
1276
  type: "integer",
@@ -1288,18 +1285,18 @@ function createController(props) {
1288
1285
  ]
1289
1286
  },
1290
1287
  IAutoBePreliminaryGetPreviousDatabaseSchemas: {
1291
- 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",
1288
+ 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.",
1292
1289
  type: "object",
1293
1290
  properties: {
1294
1291
  type: {
1295
- 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.",
1292
+ description: "Type discriminator.",
1296
1293
  type: "string",
1297
1294
  "enum": [
1298
1295
  "getPreviousDatabaseSchemas"
1299
1296
  ]
1300
1297
  },
1301
1298
  schemaNames: {
1302
- 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\"",
1299
+ description: "Table names to retrieve from previous iteration. DO NOT request same names\nalready requested in previous calls.",
1303
1300
  type: "array",
1304
1301
  items: {
1305
1302
  type: "string"
@@ -1313,26 +1310,26 @@ function createController(props) {
1313
1310
  ]
1314
1311
  },
1315
1312
  "IAutoBeDatabaseSchemaReviewApplication.IComplete": {
1316
- description: "Request to review and refine database schema models.\n\nExecutes comprehensive schema review to validate design quality and\nidentify necessary improvements for normalization, relationships, and\nperformance optimization.",
1313
+ description: "Review and refine database schema models for normalization, relationships,\nand performance.",
1317
1314
  type: "object",
1318
1315
  properties: {
1319
1316
  type: {
1320
- 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.",
1317
+ description: "Type discriminator for completion request.",
1321
1318
  type: "string",
1322
1319
  "enum": [
1323
1320
  "complete"
1324
1321
  ]
1325
1322
  },
1326
1323
  review: {
1327
- description: "Comprehensive review analysis of the schema.\n\nContains detailed evaluation of the schema design including:\n\n- Normalization validation: Confirms 3NF compliance and proper data\n structure\n- Relationship integrity: Validates foreign key references and cardinality\n- Performance optimization: Reviews indexing strategy and query patterns\n- Business logic alignment: Ensures schema supports all use cases\n- Naming conventions: Verifies consistent naming patterns\n- Data type consistency: Confirms appropriate field types\n- Temporal field handling: Validates audit trail implementation\n\nThe review identifies potential issues and confirms adherence to best\npractices before final implementation.",
1324
+ description: "Review analysis covering normalization, relationships, indexes, naming,\nand business alignment.",
1328
1325
  type: "string"
1329
1326
  },
1330
1327
  plan: {
1331
- description: "Strategic database design plan.\n\nContains the original planning document outlining the database\narchitecture strategy including table structures, relationships,\nnormalization approach, and business requirement mapping. This plan\nserves as the blueprint for validating the implemented schema.\n\nPlanning components:\n\n- Business requirements: Mapping of business needs to database structures\n- Table design: Entity definitions and attribute specifications\n- Relationship strategy: Cardinality and referential integrity planning\n- Normalization approach: Application of 1NF, 2NF, 3NF principles\n- Performance considerations: Index strategy and query optimization\n- Snapshot architecture: Temporal data handling and audit requirements\n- Materialized views: Denormalization strategy for performance",
1328
+ description: "Database design plan serving as the blueprint for validating the\nimplemented schema.",
1332
1329
  type: "string"
1333
1330
  },
1334
1331
  content: {
1335
- description: "Corrected schema definition based on review feedback, or null if no\nchanges are needed.\n\nWhen not null, the definition carries exactly one corrected\n{@link AutoBeDatabaseSchemaDefinition.model} for the reviewed target table\nso that the output stays within the LLM's maximum output token limit. If\nthe review determines that additional child tables are required (e.g. 1NF\ndecomposition), they are declared in\n{@link AutoBeDatabaseSchemaDefinition.newDesigns} as lightweight name +\ndescription pairs and will be generated by their own dedicated pipeline\ncalls.\n\nIf null, the original model remains unchanged from the original schema.\nIf not null, the modification must resolve issues identified in the\nreview.",
1332
+ description: "Corrected schema definition, or null if no changes are needed.\n\nWhen not null, carries exactly one corrected\n{@link AutoBeDatabaseSchemaDefinition.model}. Additional child tables go\nin {@link AutoBeDatabaseSchemaDefinition.newDesigns}.",
1336
1333
  anyOf: [
1337
1334
  {
1338
1335
  type: "null"
@@ -1351,15 +1348,15 @@ function createController(props) {
1351
1348
  ]
1352
1349
  },
1353
1350
  AutoBeDatabaseSchemaDefinition: {
1354
- description: "Database schema definition produced by a single schema generation or review\ncall.\n\nEach AI function call outputs exactly one target table model together with a\nlist of newly discovered table designs. The single-model constraint keeps the\noutput payload small enough to fit within the LLM's maximum output token\nlimit, while `newDesigns` lets the agent declare additional tables that\nshould be generated in subsequent calls through the normal pipeline.",
1351
+ description: "Output of a single schema generation or review call.\n\nOne target table model + lightweight designs for newly discovered child\ntables. Single-model constraint keeps output within LLM token budget.",
1355
1352
  type: "object",
1356
1353
  properties: {
1357
1354
  model: {
1358
- description: "The single database table model produced by this call.\n\nAlways represents the target table that was assigned to the agent. Limiting\nthe output to one model prevents the response from exceeding the LLM's\nmaximum output token budget.",
1355
+ description: "The single database table model produced by this call.",
1359
1356
  $ref: "#/$defs/AutoBeDatabase.IModel"
1360
1357
  },
1361
1358
  newDesigns: {
1362
- description: "Lightweight designs for additional tables discovered during generation or\nreview.\n\nWhen the agent determines that 1NF decomposition or other normalization\nrequires child tables that do not yet exist, it declares them here as\nname+description pairs rather than full model definitions.\n\nThese designs are fed back into the schema generation pipeline so that each\nnew table is produced by its own dedicated call.",
1359
+ description: "Name+description pairs for child tables discovered during generation (1NF\ndecomposition, junction tables, etc.). Each feeds back into the pipeline as\na separate generation call.",
1363
1360
  type: "array",
1364
1361
  items: {
1365
1362
  $ref: "#/$defs/AutoBeDatabaseComponentTableDesign"
@@ -1372,24 +1369,24 @@ function createController(props) {
1372
1369
  ]
1373
1370
  },
1374
1371
  "AutoBeDatabase.IModel": {
1375
- 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_)",
1372
+ description: "A single Prisma model (database table).",
1376
1373
  type: "object",
1377
1374
  properties: {
1378
1375
  name: {
1379
- 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\"",
1376
+ description: "MUST use snake_case. Materialized views use \"mv_\" prefix.",
1380
1377
  type: "string",
1381
1378
  pattern: "^[a-z][a-z0-9_]*$"
1382
1379
  },
1383
1380
  description: {
1384
- 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...\"",
1381
+ description: "Business purpose of this model. MUST be written in English. Reference\nrelated entities using \"{@\\link ModelName}\" syntax.",
1385
1382
  type: "string"
1386
1383
  },
1387
1384
  material: {
1388
- 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",
1385
+ description: "Whether this model is a materialized view (read-only cached query). If\ntrue, name must use \"mv_\" prefix.",
1389
1386
  type: "boolean"
1390
1387
  },
1391
1388
  stance: {
1392
- 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",
1389
+ 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.",
1393
1390
  type: "string",
1394
1391
  "enum": [
1395
1392
  "primary",
@@ -1400,39 +1397,39 @@ function createController(props) {
1400
1397
  ]
1401
1398
  },
1402
1399
  primaryField: {
1403
- 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.",
1400
+ description: "Primary key field (UUID).",
1404
1401
  $ref: "#/$defs/AutoBeDatabase.IPrimaryField"
1405
1402
  },
1406
1403
  foreignFields: {
1407
- 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.",
1404
+ description: "Foreign key fields establishing relationships to other models.",
1408
1405
  type: "array",
1409
1406
  items: {
1410
1407
  $ref: "#/$defs/AutoBeDatabase.IForeignField"
1411
1408
  }
1412
1409
  },
1413
1410
  plainFields: {
1414
- 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.",
1411
+ description: "Regular data fields (names, timestamps, flags, amounts, etc.).",
1415
1412
  type: "array",
1416
1413
  items: {
1417
1414
  $ref: "#/$defs/AutoBeDatabase.IPlainField"
1418
1415
  }
1419
1416
  },
1420
1417
  uniqueIndexes: {
1421
- 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).",
1418
+ description: "Unique indexes for data integrity constraints.",
1422
1419
  type: "array",
1423
1420
  items: {
1424
1421
  $ref: "#/$defs/AutoBeDatabase.IUniqueIndex"
1425
1422
  }
1426
1423
  },
1427
1424
  plainIndexes: {
1428
- 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.",
1425
+ description: "Regular indexes for query performance.",
1429
1426
  type: "array",
1430
1427
  items: {
1431
1428
  $ref: "#/$defs/AutoBeDatabase.IPlainIndex"
1432
1429
  }
1433
1430
  },
1434
1431
  ginIndexes: {
1435
- 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.",
1432
+ description: "GIN indexes for PostgreSQL full-text search (trigram).",
1436
1433
  type: "array",
1437
1434
  items: {
1438
1435
  $ref: "#/$defs/AutoBeDatabase.IGinIndex"
@@ -1453,23 +1450,22 @@ function createController(props) {
1453
1450
  ]
1454
1451
  },
1455
1452
  "AutoBeDatabase.IPrimaryField": {
1456
- 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).",
1453
+ description: "Primary key field of a model.",
1457
1454
  type: "object",
1458
1455
  properties: {
1459
1456
  name: {
1460
- 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.",
1457
+ description: "MUST use snake_case.",
1461
1458
  type: "string",
1462
1459
  pattern: "^[a-z][a-z0-9_]*$"
1463
1460
  },
1464
1461
  type: {
1465
- 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.",
1466
1462
  type: "string",
1467
1463
  "enum": [
1468
1464
  "uuid"
1469
1465
  ]
1470
1466
  },
1471
1467
  description: {
1472
- 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.",
1468
+ description: "Business purpose of this primary key. MUST be written in English.",
1473
1469
  type: "string"
1474
1470
  }
1475
1471
  },
@@ -1480,35 +1476,34 @@ function createController(props) {
1480
1476
  ]
1481
1477
  },
1482
1478
  "AutoBeDatabase.IForeignField": {
1483
- 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.",
1479
+ description: "Foreign key field establishing a relationship to another model.",
1484
1480
  type: "object",
1485
1481
  properties: {
1486
1482
  name: {
1487
- 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)",
1483
+ description: "MUST use snake_case. Convention: \"{target_model}_id\".",
1488
1484
  type: "string",
1489
1485
  pattern: "^[a-z][a-z0-9_]*$"
1490
1486
  },
1491
1487
  type: {
1492
- 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.",
1493
1488
  type: "string",
1494
1489
  "enum": [
1495
1490
  "uuid"
1496
1491
  ]
1497
1492
  },
1498
1493
  description: {
1499
- 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.",
1494
+ description: "Use format: \"Target's {@\\link ModelName.id}\". MUST be written in English.",
1500
1495
  type: "string"
1501
1496
  },
1502
1497
  relation: {
1503
- 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.",
1498
+ description: "Prisma relation configuration.",
1504
1499
  $ref: "#/$defs/AutoBeDatabase.IRelation"
1505
1500
  },
1506
1501
  unique: {
1507
- 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.",
1502
+ description: "True for 1:1 relationships, false for 1:N.",
1508
1503
  type: "boolean"
1509
1504
  },
1510
1505
  nullable: {
1511
- 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.",
1506
+ description: "True if the relationship is optional.",
1512
1507
  type: "boolean"
1513
1508
  }
1514
1509
  },
@@ -1522,20 +1517,20 @@ function createController(props) {
1522
1517
  ]
1523
1518
  },
1524
1519
  "AutoBeDatabase.IRelation": {
1525
- 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)",
1520
+ description: "Prisma",
1526
1521
  type: "object",
1527
1522
  properties: {
1528
1523
  name: {
1529
- 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",
1524
+ description: "Relation property name in this model. MUST use camelCase.",
1530
1525
  type: "string",
1531
1526
  pattern: "^[a-z][a-zA-Z0-9]*$"
1532
1527
  },
1533
1528
  targetModel: {
1534
- 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.",
1529
+ description: "Must match an existing model name in the schema.",
1535
1530
  type: "string"
1536
1531
  },
1537
1532
  oppositeName: {
1538
- 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.",
1533
+ description: "Inverse relation property name generated in the target model. Typically\nplural for 1:N (e.g., \"comments\"), singular for 1:1.",
1539
1534
  type: "string",
1540
1535
  pattern: "^[a-z][a-zA-Z0-9]*$"
1541
1536
  }
@@ -1547,16 +1542,16 @@ function createController(props) {
1547
1542
  ]
1548
1543
  },
1549
1544
  "AutoBeDatabase.IPlainField": {
1550
- 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.",
1545
+ description: "A regular data field (not a primary or foreign key).",
1551
1546
  type: "object",
1552
1547
  properties: {
1553
1548
  name: {
1554
- 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",
1549
+ description: "MUST use snake_case.",
1555
1550
  type: "string",
1556
1551
  pattern: "^[a-z][a-z0-9_]*$"
1557
1552
  },
1558
1553
  type: {
1559
- 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",
1554
+ description: "Prisma/PostgreSQL type mapping: boolean, int, double, string, uri, uuid\n(non-FK), datetime.",
1560
1555
  type: "string",
1561
1556
  "enum": [
1562
1557
  "string",
@@ -1569,11 +1564,11 @@ function createController(props) {
1569
1564
  ]
1570
1565
  },
1571
1566
  description: {
1572
- 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.\"",
1567
+ description: "Business purpose of this field. MUST be written in English.",
1573
1568
  type: "string"
1574
1569
  },
1575
1570
  nullable: {
1576
- 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.",
1571
+ description: "Whether this field can be null.",
1577
1572
  type: "boolean"
1578
1573
  }
1579
1574
  },
@@ -1585,11 +1580,11 @@ function createController(props) {
1585
1580
  ]
1586
1581
  },
1587
1582
  "AutoBeDatabase.IUniqueIndex": {
1588
- 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.",
1583
+ description: "Unique index constraint (@@unique).",
1589
1584
  type: "object",
1590
1585
  properties: {
1591
1586
  fieldNames: {
1592
- 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\"]",
1587
+ description: "Field names forming the unique constraint. All must exist in the model.",
1593
1588
  type: "array",
1594
1589
  items: {
1595
1590
  type: "string"
@@ -1598,7 +1593,7 @@ function createController(props) {
1598
1593
  uniqueItems: true
1599
1594
  },
1600
1595
  unique: {
1601
- 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\".",
1596
+ description: "Always true. Distinguishes from plain indexes.",
1602
1597
  type: "boolean",
1603
1598
  "enum": [
1604
1599
  true
@@ -1611,11 +1606,11 @@ function createController(props) {
1611
1606
  ]
1612
1607
  },
1613
1608
  "AutoBeDatabase.IPlainIndex": {
1614
- 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.",
1609
+ description: "Regular index for query performance (@@index).",
1615
1610
  type: "object",
1616
1611
  properties: {
1617
1612
  fieldNames: {
1618
- 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\"]",
1613
+ description: "Field names to index. Order matters for composite indexes.",
1619
1614
  type: "array",
1620
1615
  items: {
1621
1616
  type: "string"
@@ -1629,11 +1624,11 @@ function createController(props) {
1629
1624
  ]
1630
1625
  },
1631
1626
  "AutoBeDatabase.IGinIndex": {
1632
- 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.",
1627
+ description: "GIN index for PostgreSQL full-text search (gin_trgm_ops).",
1633
1628
  type: "object",
1634
1629
  properties: {
1635
1630
  fieldName: {
1636
- 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.",
1631
+ description: "Must be a string field containing searchable text.",
1637
1632
  type: "string"
1638
1633
  }
1639
1634
  },
@@ -1642,15 +1637,15 @@ function createController(props) {
1642
1637
  ]
1643
1638
  },
1644
1639
  AutoBeDatabaseComponentTableDesign: {
1645
- description: "Table design with name and description.\n\nRepresents a single table identified during the component extraction phase,\npairing the table name with a description of its purpose. This type\nformalizes the table design structure for database schema generation.\n\nThe description provides business context that helps:\n\n- Review agents validate that the table fulfills actual requirements\n- Schema generation create appropriate models with proper documentation\n- Future developers understand the table's role in the system",
1640
+ description: "Table design with name and description.",
1646
1641
  type: "object",
1647
1642
  properties: {
1648
1643
  description: {
1649
- description: "Brief, concise description of what this table stores and why it's needed.\n\nShould explain:\n\n- What business concept this table represents\n- What data it stores\n- Why this table is necessary for the component's domain\n\n**IMPORTANT**:\n\n- Keep it **concise** - one or two sentences maximum\n- Description must be written in English",
1644
+ description: "Business purpose of this table. One or two sentences maximum. MUST be\nwritten in English.",
1650
1645
  type: "string"
1651
1646
  },
1652
1647
  name: {
1653
- description: "Name of the database table.\n\nMust follow snake_case naming convention with appropriate domain prefix.\nExamples: `shopping_customers`, `bbs_articles`, `order_items`",
1648
+ description: "Table name in snake_case with domain prefix (e.g., \"shopping_customers\").",
1654
1649
  type: "string",
1655
1650
  pattern: "^[a-z][a-z0-9_]*$"
1656
1651
  }
@@ -1662,7 +1657,7 @@ function createController(props) {
1662
1657
  }
1663
1658
  }
1664
1659
  },
1665
- description: "Process schema review task or preliminary data requests.\n\nReviews generated database models to validate normalization, relationships,\nindexes, and business alignment, producing necessary modifications.",
1660
+ description: "Process schema review task or retrieve preliminary data.",
1666
1661
  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.review && "string" === typeof input.plan && (null === input.content || "object" === typeof input.content && null !== input.content && _io6(input.content)); const _io6 = input => "object" === typeof input.model && null !== input.model && _io7(input.model) && (Array.isArray(input.newDesigns) && input.newDesigns.every(elem => "object" === typeof elem && null !== elem && _io15(elem))); const _io7 = 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 && _io8(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io9(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io11(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io13(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io14(elem))); const _io8 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io9 = 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 && _io10(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io10 = 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 _io11 = 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 _io12 = 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 _io13 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io14 = input => "string" === typeof input.fieldName; const _io15 = input => "string" === typeof input.description && ("string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name)); const _iu0 = input => (() => {
1667
1662
  if ("getAnalysisSections" === input.type)
1668
1663
  return _io1(input);