@autobe/agent 0.26.0 → 0.28.0

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 (205) hide show
  1. package/lib/AutoBeAgent.d.ts +2 -1
  2. package/lib/AutoBeAgent.js +27 -7
  3. package/lib/AutoBeAgent.js.map +1 -1
  4. package/lib/AutoBeMockAgent.js +2 -4
  5. package/lib/AutoBeMockAgent.js.map +1 -1
  6. package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -11
  7. package/lib/context/AutoBeContext.d.ts +4 -1
  8. package/lib/context/AutoBeTokenUsage.d.ts +1 -1
  9. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  10. package/lib/context/assertSchemaModel.d.ts +1 -1
  11. package/lib/context/assertSchemaModel.js +4 -7
  12. package/lib/context/assertSchemaModel.js.map +1 -1
  13. package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +7 -0
  14. package/lib/factory/AutoBeFunctionCallingMetricFactory.js +35 -0
  15. package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +1 -0
  16. package/lib/factory/AutoBeProcessAggregateFactory.d.ts +13 -0
  17. package/lib/factory/AutoBeProcessAggregateFactory.js +100 -0
  18. package/lib/factory/AutoBeProcessAggregateFactory.js.map +1 -0
  19. package/lib/factory/createAutoBeContext.d.ts +2 -1
  20. package/lib/factory/createAutoBeContext.js +78 -27
  21. package/lib/factory/createAutoBeContext.js.map +1 -1
  22. package/lib/index.mjs +24065 -12997
  23. package/lib/index.mjs.map +1 -1
  24. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
  25. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  26. package/lib/orchestrate/analyze/orchestrateAnalyze.js +1 -0
  27. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  28. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +166 -87
  29. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  30. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +639 -322
  31. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  32. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +146 -76
  33. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  34. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +17 -52
  35. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +25 -22
  36. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +7 -23
  37. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +2 -1
  38. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +168 -4
  39. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
  40. package/lib/{factory/createAutoBeApplication.d.ts → orchestrate/facade/createAutoBeFacadeController.d.ts} +2 -2
  41. package/lib/orchestrate/facade/createAutoBeFacadeController.js +1308 -0
  42. package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -0
  43. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplication.js.map +1 -0
  44. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationProps.js.map +1 -0
  45. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationResult.js.map +1 -0
  46. package/lib/orchestrate/facade/{transformFacadeStateMessage.d.ts → structures/transformFacadeStateMessage.d.ts} +1 -1
  47. package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js.map +1 -0
  48. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +2 -2
  49. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  50. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
  51. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  52. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +3 -2
  53. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
  54. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +1 -1
  55. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  56. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
  57. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  58. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
  59. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  60. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
  61. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  62. package/lib/orchestrate/interface/orchestrateInterface.d.ts +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterface.js +15 -8
  64. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  65. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +874 -49
  66. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  67. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +1858 -67
  68. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  69. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +251 -133
  70. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  71. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -6
  72. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +257 -135
  73. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
  74. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +341 -227
  75. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  76. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +761 -49
  77. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  78. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +911 -50
  79. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  80. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +207 -4
  81. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
  82. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +109 -2
  83. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
  84. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +5 -3
  85. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1904 -77
  86. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  87. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +1858 -67
  88. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  89. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +23 -23
  90. package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
  91. package/lib/orchestrate/prisma/orchestratePrisma.js +1 -0
  92. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  93. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +391 -197
  94. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  95. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1168 -591
  96. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  97. package/lib/orchestrate/prisma/orchestratePrismaReview.js +1186 -600
  98. package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  99. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +6 -3
  100. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  101. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +2 -2
  102. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
  103. package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
  104. package/lib/orchestrate/realize/orchestrateRealize.js +2 -1
  105. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  106. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +362 -180
  107. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  108. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +399 -199
  109. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  110. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +133 -4
  111. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  112. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +171 -7
  113. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
  114. package/lib/orchestrate/realize/orchestrateRealizeWrite.js +132 -3
  115. package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  116. package/lib/orchestrate/realize/utils/replaceImportStatements.js +0 -85
  117. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  118. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  119. package/lib/orchestrate/test/orchestrateTest.d.ts +1 -1
  120. package/lib/orchestrate/test/orchestrateTest.js +2 -1
  121. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  122. package/lib/orchestrate/test/orchestrateTestCorrect.js +134 -3
  123. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  124. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +169 -4
  125. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
  126. package/lib/orchestrate/test/orchestrateTestScenario.js +257 -4
  127. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  128. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +283 -4
  129. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
  130. package/lib/orchestrate/test/orchestrateTestWrite.js +141 -3
  131. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  132. package/lib/utils/TokenUsageComputer.d.ts +5 -0
  133. package/lib/utils/TokenUsageComputer.js +29 -0
  134. package/lib/utils/TokenUsageComputer.js.map +1 -0
  135. package/package.json +10 -10
  136. package/src/AutoBeAgent.ts +40 -6
  137. package/src/AutoBeMockAgent.ts +2 -4
  138. package/src/constants/AutoBeSystemPromptConstant.ts +11 -11
  139. package/src/context/AutoBeContext.ts +8 -0
  140. package/src/context/AutoBeTokenUsage.ts +1 -1
  141. package/src/context/assertSchemaModel.ts +5 -8
  142. package/src/factory/AutoBeFunctionCallingMetricFactory.ts +44 -0
  143. package/src/factory/AutoBeProcessAggregateFactory.ts +141 -0
  144. package/src/factory/createAutoBeContext.ts +96 -36
  145. package/src/orchestrate/analyze/orchestrateAnalyze.ts +1 -0
  146. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +9 -10
  147. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +15 -10
  148. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -11
  149. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +19 -54
  150. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +25 -22
  151. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +8 -24
  152. package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +20 -3
  153. package/src/orchestrate/facade/createAutoBeFacadeController.ts +136 -0
  154. package/src/orchestrate/facade/{transformFacadeStateMessage.ts → structures/transformFacadeStateMessage.ts} +2 -2
  155. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +1 -0
  156. package/src/orchestrate/interface/orchestrateInterface.ts +17 -6
  157. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -2
  158. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +13 -2
  159. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +16 -11
  160. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +16 -13
  161. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +19 -15
  162. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +13 -2
  163. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +16 -2
  164. package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +13 -2
  165. package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +11 -2
  166. package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +24 -16
  167. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +13 -2
  168. package/src/orchestrate/prisma/orchestratePrisma.ts +2 -1
  169. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +15 -10
  170. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -10
  171. package/src/orchestrate/prisma/orchestratePrismaReview.ts +9 -11
  172. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +2 -1
  173. package/src/orchestrate/realize/orchestrateRealize.ts +3 -2
  174. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +15 -10
  175. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +15 -10
  176. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +14 -3
  177. package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +21 -6
  178. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +13 -2
  179. package/src/orchestrate/realize/utils/replaceImportStatements.ts +0 -90
  180. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +5 -1
  181. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +1 -1
  182. package/src/orchestrate/test/orchestrateTest.ts +3 -2
  183. package/src/orchestrate/test/orchestrateTestCorrect.ts +14 -2
  184. package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +21 -3
  185. package/src/orchestrate/test/orchestrateTestScenario.ts +13 -2
  186. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +13 -2
  187. package/src/orchestrate/test/orchestrateTestWrite.ts +13 -2
  188. package/src/utils/TokenUsageComputer.ts +35 -0
  189. package/lib/context/IAutoBeFacadeApplication.js.map +0 -1
  190. package/lib/context/IAutoBeFacadeApplicationProps.js.map +0 -1
  191. package/lib/context/IAutoBeFacadeApplicationResult.js.map +0 -1
  192. package/lib/factory/createAutoBeApplication.js +0 -942
  193. package/lib/factory/createAutoBeApplication.js.map +0 -1
  194. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
  195. package/src/factory/createAutoBeApplication.ts +0 -123
  196. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.d.ts +0 -0
  197. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.js +0 -0
  198. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.d.ts +0 -0
  199. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.js +0 -0
  200. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.d.ts +0 -0
  201. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.js +0 -0
  202. /package/lib/orchestrate/facade/{transformFacadeStateMessage.js → structures/transformFacadeStateMessage.js} +0 -0
  203. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.ts +0 -0
  204. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.ts +0 -0
  205. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.ts +0 -0
@@ -58,7 +58,7 @@ const orchestrateAnalyzeScenario = (ctx) => __awaiter(void 0, void 0, void 0, fu
58
58
  const pointer = {
59
59
  value: null,
60
60
  };
61
- const { histories, tokenUsage } = yield ctx.conversate({
61
+ const { histories, tokenUsage, metric } = yield ctx.conversate({
62
62
  source: "analyzeScenario",
63
63
  controller: createController({
64
64
  model: ctx.model,
@@ -86,6 +86,7 @@ const orchestrateAnalyzeScenario = (ctx) => __awaiter(void 0, void 0, void 0, fu
86
86
  language: pointer.value.language,
87
87
  actors: pointer.value.actors,
88
88
  files: pointer.value.files,
89
+ metric,
89
90
  tokenUsage,
90
91
  step: ((_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : -1) + 1,
91
92
  created_at: start.toISOString(),
@@ -94,7 +95,11 @@ const orchestrateAnalyzeScenario = (ctx) => __awaiter(void 0, void 0, void 0, fu
94
95
  exports.orchestrateAnalyzeScenario = orchestrateAnalyzeScenario;
95
96
  function createController(props) {
96
97
  (0, assertSchemaModel_1.assertSchemaModel)(props.model);
97
- const application = collection[props.model];
98
+ const application = collection[props.model === "chatgpt"
99
+ ? "chatgpt"
100
+ : props.model === "gemini"
101
+ ? "gemini"
102
+ : "claude"];
98
103
  return {
99
104
  protocol: "class",
100
105
  name: "Compose",
@@ -106,345 +111,661 @@ function createController(props) {
106
111
  },
107
112
  };
108
113
  }
109
- const claude = {
110
- model: "claude",
111
- options: {
112
- reference: true,
113
- separate: null
114
- },
115
- functions: [
116
- {
117
- name: "compose",
118
- parameters: {
119
- description: " Prefix, actors, and files\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
120
- type: "object",
121
- properties: {
122
- reason: {
123
- description: "Reason for the analysis and composition of the project structure.",
124
- type: "string"
125
- },
126
- prefix: {
127
- description: "Prefix for file names and variable names. This will be used for\norganizing documentation files.\n\nDO: Use camelCase naming convention.",
128
- type: "string",
129
- pattern: "^[a-z][a-zA-Z0-9]*$"
130
- },
131
- actors: {
132
- description: "Actors to be assigned for the project",
133
- type: "array",
134
- items: {
135
- $ref: "#/$defs/AutoBeAnalyzeActor"
114
+ const collection = {
115
+ chatgpt: {
116
+ model: "chatgpt",
117
+ options: {
118
+ reference: true,
119
+ strict: false,
120
+ separate: null
121
+ },
122
+ functions: [
123
+ {
124
+ name: "compose",
125
+ parameters: {
126
+ description: " - Project prefix, actors, and file list\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
127
+ type: "object",
128
+ properties: {
129
+ reason: {
130
+ description: "Reason for the analysis and composition of the project structure.",
131
+ type: "string"
132
+ },
133
+ prefix: {
134
+ description: "Prefix for file names and variable names. This will be used for\norganizing documentation files.\n\nDO: Use camelCase naming convention.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
135
+ type: "string"
136
+ },
137
+ actors: {
138
+ description: "Actors to be assigned for the project.\n\nEach actor has:\n\n- `name`: Actor identifier (camelCase)\n- `kind`: \"guest\" | \"member\" | \"admin\"\n- `description`: Actor's permissions and capabilities",
139
+ type: "array",
140
+ items: {
141
+ $ref: "#/$defs/AutoBeAnalyzeActor"
142
+ }
143
+ },
144
+ language: {
145
+ description: "Language for document content. When specified by the user, this takes\nprecedence over the locale setting for determining document language.",
146
+ type: "string"
147
+ },
148
+ page: {
149
+ description: "If the user has requested a specific number of pages, enter that number.\nOtherwise, provide an appropriate number of documents needed to meet the\nuser's requirements. This number must always match the length of the\nfiles property, must be greater than 1, and must include the table of\ncontents. For example, if the user requests 3 pages, the total should be\n4, including the table of contents.",
150
+ type: "number"
151
+ },
152
+ files: {
153
+ description: "Array of document metadata objects defining files to be generated.\n\nEach array element is an AutoBeAnalyzeFile.Scenario object containing:\n- filename: The output file name (e.g., \"01-service-overview.md\")\n- reason: Why this document is being created\n- documentType, outline, constraints, etc.: Metadata guiding content generation\n\nThese documents represent business-focused planning documentation:\n- Business requirements and functional specifications in natural language\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service overview and business model description\n- User actors and permission requirements (described in natural language)\n- Business logic and validation rules\n- DO NOT: Include database schemas, ERD, or API specifications\n- DO: Write all requirements in natural language for clarity\n\nGenerate metadata objects based on actual requirements gathered from conversation.\nDo not create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Array Length Rules\n\nThe array length must match the user's requested page count plus one for ToC.\nFor example: user requests 3 pages \u2192 generate 4 objects (1 ToC + 3 content).\nIf user does not specify a number, generate sufficient objects to adequately\ndocument the service (typically 11+ objects including ToC).\n\n\n@minItems 1",
154
+ type: "array",
155
+ items: {
156
+ $ref: "#/$defs/AutoBeAnalyzeFile.Scenario"
157
+ }
136
158
  }
137
159
  },
138
- language: {
139
- description: "Language for document content. When specified by the user, this takes\nprecedence over the locale setting for determining document language.",
140
- type: "string"
141
- },
142
- page: {
143
- description: "If the user has requested a specific number of pages, enter that number.\nOtherwise, provide an appropriate number of documents needed to meet the\nuser's requirements. This number must always match the length of the\nfiles property, must be greater than 1, and must include the table of\ncontents. For example, if the user requests 3 pages, the total should be\n4, including the table of contents.",
144
- type: "number"
145
- },
146
- files: {
147
- description: "# Document files to be generated\n\nFile name must be English and it must contain the numbering and prefix.\n\nThese files represent business documentation that may include:\n\n- Business requirements and functional specifications in natural language\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service overview and business model description\n- User actors and permission requirements (described in natural language)\n- Business logic and validation rules\n- DO NOT: Include database schemas, ERD, or API specifications\n- DO: Write all requirements in natural language for clarity\n\nGenerate files based on actual requirements gathered from conversation.\nDo not create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Page Length Rules\n\nThe number of documents must match the user's request, excluding the\ntable of contents. For example, if the user requests 3 pages, a total of\n4 documents should be generated, including the table of contents. If the\nuser does not specify a number, generate a sufficient number of documents\nto adequately support the service.",
148
- type: "array",
149
- items: {
150
- $ref: "#/$defs/AutoBeAnalyzeFile.Scenario"
151
- },
152
- minItems: 1
153
- }
154
- },
155
- required: [
156
- "reason",
157
- "prefix",
158
- "actors",
159
- "page",
160
- "files"
161
- ],
162
- additionalProperties: false,
163
- $defs: {
164
- AutoBeAnalyzeActor: {
165
- description: "Interface representing a user actor definition in the requirements analysis\nphase.\n\nThis interface defines authenticated user actors that will be used throughout\nthe application's authentication and authorization system. Each actor\nrepresents a distinct type of user who can register, authenticate, and\ninteract with the system based on their specific permissions and\ncapabilities.\n\nThe actors defined here serve as the foundation for generating:\n\n- Prisma schema models for user authentication tables\n- API endpoint access control decorators\n- Actor-based authorization logic in the business layer\n- Test scenarios for different user permission levels",
166
- type: "object",
167
- properties: {
168
- name: {
169
- description: "Unique identifier for the user actor.\n\nThis name will be used as a reference throughout the generated codebase,\nincluding Prisma schema model names, authorization decorator parameters,\nand API documentation.\n\nMUST use camelCase naming convention.",
170
- type: "string",
171
- pattern: "^[a-z][a-zA-Z0-9]*$",
172
- minLength: 1
160
+ required: [
161
+ "reason",
162
+ "prefix",
163
+ "actors",
164
+ "page",
165
+ "files"
166
+ ],
167
+ additionalProperties: false,
168
+ $defs: {
169
+ AutoBeAnalyzeActor: {
170
+ description: "Interface representing a user actor definition in the requirements analysis\nphase.\n\nThis interface defines authenticated user actors that will be used throughout\nthe application's authentication and authorization system. Each actor\nrepresents a distinct type of user who can register, authenticate, and\ninteract with the system based on their specific permissions and\ncapabilities.\n\nThe actors defined here serve as the foundation for generating:\n\n- Prisma schema models for user authentication tables\n- API endpoint access control decorators\n- Actor-based authorization logic in the business layer\n- Test scenarios for different user permission levels",
171
+ type: "object",
172
+ properties: {
173
+ name: {
174
+ description: "Unique identifier for the user actor.\n\nThis name will be used as a reference throughout the generated codebase,\nincluding Prisma schema model names, authorization decorator parameters,\nand API documentation.\n\nMUST use camelCase naming convention.\n\n\n@minLength 1\n@pattern ^[a-z][a-zA-Z0-9]*$",
175
+ type: "string"
176
+ },
177
+ kind: {
178
+ description: "Actor category classification for system-wide permission hierarchy.\n\nThis property categorizes actors into three fundamental permission levels,\nestablishing a clear hierarchy for authorization decisions throughout the\napplication. The kind determines baseline access patterns and security\nboundaries:\n\n- \"guest\": Unauthenticated users or those with minimal permissions. Typically\n limited to public resources and registration/login endpoints.\n- \"member\": Authenticated users with standard access permissions. Can access\n personal resources and participate in core application features.\n- \"admin\": System administrators with elevated permissions. Can manage other\n users, access administrative functions, and modify system-wide settings.",
179
+ type: "string",
180
+ "enum": [
181
+ "guest",
182
+ "member",
183
+ "admin"
184
+ ]
185
+ },
186
+ description: {
187
+ description: "Human-readable description of the actor's permissions and capabilities.\n\nThis description helps the AI agents understand the business context and\naccess requirements for each actor, guiding the generation of appropriate\nauthorization rules and API endpoint restrictions.",
188
+ type: "string"
189
+ }
173
190
  },
174
- kind: {
175
- description: "Actor category classification for system-wide permission hierarchy.\n\nThis property categorizes actors into three fundamental permission levels,\nestablishing a clear hierarchy for authorization decisions throughout the\napplication. The kind determines baseline access patterns and security\nboundaries:\n\n- \"guest\": Unauthenticated users or those with minimal permissions. Typically\n limited to public resources and registration/login endpoints.\n- \"member\": Authenticated users with standard access permissions. Can access\n personal resources and participate in core application features.\n- \"admin\": System administrators with elevated permissions. Can manage other\n users, access administrative functions, and modify system-wide settings.",
176
- oneOf: [
177
- {
178
- "const": "guest"
179
- },
180
- {
181
- "const": "member"
182
- },
183
- {
184
- "const": "admin"
191
+ required: [
192
+ "name",
193
+ "kind",
194
+ "description"
195
+ ]
196
+ },
197
+ "AutoBeAnalyzeFile.Scenario": {
198
+ type: "object",
199
+ properties: {
200
+ reason: {
201
+ description: "Describe briefly why you made this document, and if you have any plans\nfor the next one. This helps maintain context between documents and\nensures a logical flow in documentation creation. Example: \"To define the\ncore features and user needs for the e-commerce platform before moving on\nto detailed user flow documentation.\"",
202
+ type: "string"
203
+ },
204
+ filename: {
205
+ description: "Filename to generate or overwrite. Should be descriptive and follow a\nconsistent naming convention. Examples: \"01-service-overview.md\",\n\"02-user-requirements.md\", \"03-business-model.md\"\n\n\n@pattern ((.*)\\.md)$",
206
+ type: "string"
207
+ },
208
+ documentType: {
209
+ description: "Document type that determines the structure and content guidelines. This\nhelps the AI understand what kind of document to create and what sections\nor information should be included. Examples:\n\n- \"requirement\": Functional/non-functional requirements, acceptance\n criteria\n- \"user-story\": User personas, scenarios, and journey descriptions\n- \"user-flow\": Step-by-step user interactions and decision points\n- \"business-model\": Revenue streams, cost structure, value propositions\n- \"service-overview\": High-level service description, goals, and scope",
210
+ type: "string"
211
+ },
212
+ outline: {
213
+ description: "Outline or table of contents that guides the document structure. Each\nitem represents a main section to be covered in the document. The AI will\nexpand each section with appropriate content while maintaining the\nspecified structure. Example: [\"Executive Summary\", \"Problem Statement\",\n\"Target Users\", \"Core Features\", \"Success Metrics\", \"Implementation\nTimeline\"]",
214
+ type: "array",
215
+ items: {
216
+ type: "string"
217
+ }
218
+ },
219
+ audience: {
220
+ description: "Target audience for this document. Determines the language, technical\ndepth, and focus areas of the content. If not specified, the document\nwill be written for a general audience with balanced technical and\nbusiness perspectives. Examples:\n\n- \"development team\": More technical details, implementation considerations\n- \"business stakeholders\": Focus on ROI, business value, market opportunity\n- \"end users\": User-friendly language, benefits, and use cases\n- \"product managers\": Balance of user needs, business goals, and\n feasibility\n- \"general\": Accessible to all stakeholders (default if not specified)",
221
+ type: "string"
222
+ },
223
+ keyQuestions: {
224
+ description: "Key questions or concerns this document should address. Helps ensure the\ndocument covers all important aspects and doesn't miss critical\ninformation. The AI will make sure to answer these questions within the\ndocument content. Examples:\n\n- \"What problem does this service solve?\"\n- \"Who are the primary and secondary users?\"\n- \"What are the main competitive advantages?\"\n- \"How will we measure success?\"\n- \"What are the potential risks and mitigation strategies?\"",
225
+ type: "array",
226
+ items: {
227
+ type: "string"
228
+ }
229
+ },
230
+ detailLevel: {
231
+ description: "Level of detail expected in the document. Guides how deeply the AI should\nexplore each topic and how much information to include. Examples:\n\n- \"high-level overview\": Brief, conceptual, focusing on the big picture\n- \"detailed specification\": Comprehensive, with specific examples and edge\n cases\n- \"executive summary\": Concise, focusing on key points and decisions\n- \"moderate detail\": Balanced approach with essential details (default)",
232
+ type: "string"
233
+ },
234
+ relatedDocuments: {
235
+ description: "Related documents that this document references or builds upon. Helps\nmaintain consistency across documentation and allows the AI to understand\nthe broader context. These documents should already exist or be planned\nin the documentation roadmap. Examples: [\"00-project-charter.md\",\n\"01-market-analysis.md\", \"02-competitor-research.md\"]",
236
+ type: "array",
237
+ items: {
238
+ type: "string"
185
239
  }
186
- ]
240
+ },
241
+ constraints: {
242
+ description: "Specific constraints or requirements for the document. These are\nmust-have elements or considerations that should be included regardless\nof other factors. The AI will ensure these constraints are met.\nExamples:\n\n- \"Must include cost-benefit analysis\"\n- \"Focus on mobile-first user experience\"\n- \"Include measurable KPIs and success metrics\"\n- \"Address data privacy and security concerns\"\n- \"Consider scalability for 1M+ users\"\n- \"Include timeline and milestone recommendations\"",
243
+ type: "array",
244
+ items: {
245
+ type: "string"
246
+ }
247
+ }
187
248
  },
188
- description: {
189
- description: "Human-readable description of the actor's permissions and capabilities.\n\nThis description helps the AI agents understand the business context and\naccess requirements for each actor, guiding the generation of appropriate\nauthorization rules and API endpoint restrictions.",
190
- type: "string"
249
+ required: [
250
+ "reason",
251
+ "filename"
252
+ ]
253
+ }
254
+ }
255
+ },
256
+ description: "Composes project structure with actors and documentation files.\n\nDetermines the list of user actors and documents to generate based on\nrequirements. If requirements are incomplete, returns empty arrays.",
257
+ validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.prefix && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix)) && (Array.isArray(input.actors) && input.actors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (undefined === input.language || "string" === typeof input.language) && "number" === typeof input.page && (Array.isArray(input.files) && (1 <= input.files.length && input.files.every(elem => "object" === typeof elem && null !== elem && _io2(elem)))); const _io1 = input => "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && 1 <= input.name.length) && ("guest" === input.kind || "member" === input.kind || "admin" === input.kind) && "string" === typeof input.description; const _io2 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && (undefined === input.documentType || "string" === typeof input.documentType) && (undefined === input.outline || Array.isArray(input.outline) && input.outline.every(elem => "string" === typeof elem)) && (undefined === input.audience || "string" === typeof input.audience) && (undefined === input.keyQuestions || Array.isArray(input.keyQuestions) && input.keyQuestions.every(elem => "string" === typeof elem)) && (undefined === input.detailLevel || "string" === typeof input.detailLevel) && (undefined === input.relatedDocuments || Array.isArray(input.relatedDocuments) && input.relatedDocuments.every(elem => "string" === typeof elem)) && (undefined === input.constraints || Array.isArray(input.constraints) && input.constraints.every(elem => "string" === typeof elem)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
258
+ path: _path + ".reason",
259
+ expected: "string",
260
+ value: input.reason
261
+ }), "string" === typeof input.prefix && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix) || _report(_exceptionable, {
262
+ path: _path + ".prefix",
263
+ expected: "string & CamelCasePattern",
264
+ value: input.prefix
265
+ })) || _report(_exceptionable, {
266
+ path: _path + ".prefix",
267
+ expected: "(string & CamelCasePattern)",
268
+ value: input.prefix
269
+ }), (Array.isArray(input.actors) || _report(_exceptionable, {
270
+ path: _path + ".actors",
271
+ expected: "Array<AutoBeAnalyzeActor>",
272
+ value: input.actors
273
+ })) && input.actors.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
274
+ path: _path + ".actors[" + _index7 + "]",
275
+ expected: "AutoBeAnalyzeActor",
276
+ value: elem
277
+ })) && _vo1(elem, _path + ".actors[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
278
+ path: _path + ".actors[" + _index7 + "]",
279
+ expected: "AutoBeAnalyzeActor",
280
+ value: elem
281
+ })).every(flag => flag) || _report(_exceptionable, {
282
+ path: _path + ".actors",
283
+ expected: "Array<AutoBeAnalyzeActor>",
284
+ value: input.actors
285
+ }), undefined === input.language || "string" === typeof input.language || _report(_exceptionable, {
286
+ path: _path + ".language",
287
+ expected: "(string | undefined)",
288
+ value: input.language
289
+ }), "number" === typeof input.page || _report(_exceptionable, {
290
+ path: _path + ".page",
291
+ expected: "number",
292
+ value: input.page
293
+ }), (Array.isArray(input.files) || _report(_exceptionable, {
294
+ path: _path + ".files",
295
+ expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
296
+ value: input.files
297
+ })) && ((1 <= input.files.length || _report(_exceptionable, {
298
+ path: _path + ".files",
299
+ expected: "Array<> & MinItems<1>",
300
+ value: input.files
301
+ })) && input.files.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
302
+ path: _path + ".files[" + _index8 + "]",
303
+ expected: "AutoBeAnalyzeFile.Scenario",
304
+ value: elem
305
+ })) && _vo2(elem, _path + ".files[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
306
+ path: _path + ".files[" + _index8 + "]",
307
+ expected: "AutoBeAnalyzeFile.Scenario",
308
+ value: elem
309
+ })).every(flag => flag)) || _report(_exceptionable, {
310
+ path: _path + ".files",
311
+ expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
312
+ value: input.files
313
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
314
+ path: _path + ".name",
315
+ expected: "string & CamelCasePattern",
316
+ value: input.name
317
+ })) && (1 <= input.name.length || _report(_exceptionable, {
318
+ path: _path + ".name",
319
+ expected: "string & MinLength<1>",
320
+ value: input.name
321
+ })) || _report(_exceptionable, {
322
+ path: _path + ".name",
323
+ expected: "(string & CamelCasePattern & MinLength<1>)",
324
+ value: input.name
325
+ }), "guest" === input.kind || "member" === input.kind || "admin" === input.kind || _report(_exceptionable, {
326
+ path: _path + ".kind",
327
+ expected: "(\"admin\" | \"guest\" | \"member\")",
328
+ value: input.kind
329
+ }), "string" === typeof input.description || _report(_exceptionable, {
330
+ path: _path + ".description",
331
+ expected: "string",
332
+ value: input.description
333
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
334
+ path: _path + ".reason",
335
+ expected: "string",
336
+ value: input.reason
337
+ }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
338
+ path: _path + ".filename",
339
+ expected: "`${string}.md`",
340
+ value: input.filename
341
+ }), undefined === input.documentType || "string" === typeof input.documentType || _report(_exceptionable, {
342
+ path: _path + ".documentType",
343
+ expected: "(string | undefined)",
344
+ value: input.documentType
345
+ }), undefined === input.outline || (Array.isArray(input.outline) || _report(_exceptionable, {
346
+ path: _path + ".outline",
347
+ expected: "(Array<string> | undefined)",
348
+ value: input.outline
349
+ })) && input.outline.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
350
+ path: _path + ".outline[" + _index9 + "]",
351
+ expected: "string",
352
+ value: elem
353
+ })).every(flag => flag) || _report(_exceptionable, {
354
+ path: _path + ".outline",
355
+ expected: "(Array<string> | undefined)",
356
+ value: input.outline
357
+ }), undefined === input.audience || "string" === typeof input.audience || _report(_exceptionable, {
358
+ path: _path + ".audience",
359
+ expected: "(string | undefined)",
360
+ value: input.audience
361
+ }), undefined === input.keyQuestions || (Array.isArray(input.keyQuestions) || _report(_exceptionable, {
362
+ path: _path + ".keyQuestions",
363
+ expected: "(Array<string> | undefined)",
364
+ value: input.keyQuestions
365
+ })) && input.keyQuestions.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
366
+ path: _path + ".keyQuestions[" + _index10 + "]",
367
+ expected: "string",
368
+ value: elem
369
+ })).every(flag => flag) || _report(_exceptionable, {
370
+ path: _path + ".keyQuestions",
371
+ expected: "(Array<string> | undefined)",
372
+ value: input.keyQuestions
373
+ }), undefined === input.detailLevel || "string" === typeof input.detailLevel || _report(_exceptionable, {
374
+ path: _path + ".detailLevel",
375
+ expected: "(string | undefined)",
376
+ value: input.detailLevel
377
+ }), undefined === input.relatedDocuments || (Array.isArray(input.relatedDocuments) || _report(_exceptionable, {
378
+ path: _path + ".relatedDocuments",
379
+ expected: "(Array<string> | undefined)",
380
+ value: input.relatedDocuments
381
+ })) && input.relatedDocuments.map((elem, _index11) => "string" === typeof elem || _report(_exceptionable, {
382
+ path: _path + ".relatedDocuments[" + _index11 + "]",
383
+ expected: "string",
384
+ value: elem
385
+ })).every(flag => flag) || _report(_exceptionable, {
386
+ path: _path + ".relatedDocuments",
387
+ expected: "(Array<string> | undefined)",
388
+ value: input.relatedDocuments
389
+ }), undefined === input.constraints || (Array.isArray(input.constraints) || _report(_exceptionable, {
390
+ path: _path + ".constraints",
391
+ expected: "(Array<string> | undefined)",
392
+ value: input.constraints
393
+ })) && input.constraints.map((elem, _index12) => "string" === typeof elem || _report(_exceptionable, {
394
+ path: _path + ".constraints[" + _index12 + "]",
395
+ expected: "string",
396
+ value: elem
397
+ })).every(flag => flag) || _report(_exceptionable, {
398
+ path: _path + ".constraints",
399
+ expected: "(Array<string> | undefined)",
400
+ value: input.constraints
401
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
402
+ if (false === __is(input)) {
403
+ errors = [];
404
+ _report = __typia_transform__validateReport._validateReport(errors);
405
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
406
+ path: _path + "",
407
+ expected: "IAutoBeAnalyzeScenarioApplication.IProps",
408
+ value: input
409
+ })) && _vo0(input, _path + "", true) || _report(true, {
410
+ path: _path + "",
411
+ expected: "IAutoBeAnalyzeScenarioApplication.IProps",
412
+ value: input
413
+ }))(input, "$input", true);
414
+ const success = 0 === errors.length;
415
+ return success ? {
416
+ success,
417
+ data: input
418
+ } : {
419
+ success,
420
+ errors,
421
+ data: input
422
+ };
423
+ }
424
+ return {
425
+ success: true,
426
+ data: input
427
+ };
428
+ }; })()
429
+ }
430
+ ]
431
+ },
432
+ claude: {
433
+ model: "claude",
434
+ options: {
435
+ reference: true,
436
+ separate: null
437
+ },
438
+ functions: [
439
+ {
440
+ name: "compose",
441
+ parameters: {
442
+ description: " - Project prefix, actors, and file list\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
443
+ type: "object",
444
+ properties: {
445
+ reason: {
446
+ description: "Reason for the analysis and composition of the project structure.",
447
+ type: "string"
448
+ },
449
+ prefix: {
450
+ description: "Prefix for file names and variable names. This will be used for\norganizing documentation files.\n\nDO: Use camelCase naming convention.",
451
+ type: "string",
452
+ pattern: "^[a-z][a-zA-Z0-9]*$"
453
+ },
454
+ actors: {
455
+ description: "Actors to be assigned for the project.\n\nEach actor has:\n\n- `name`: Actor identifier (camelCase)\n- `kind`: \"guest\" | \"member\" | \"admin\"\n- `description`: Actor's permissions and capabilities",
456
+ type: "array",
457
+ items: {
458
+ $ref: "#/$defs/AutoBeAnalyzeActor"
191
459
  }
192
460
  },
193
- required: [
194
- "name",
195
- "kind",
196
- "description"
197
- ]
198
- },
199
- "AutoBeAnalyzeFile.Scenario": {
200
- type: "object",
201
- properties: {
202
- reason: {
203
- description: "Describe briefly why you made this document, and if you have any plans\nfor the next one. This helps maintain context between documents and\nensures a logical flow in documentation creation. Example: \"To define the\ncore features and user needs for the e-commerce platform before moving on\nto detailed user flow documentation.\"",
204
- type: "string"
205
- },
206
- filename: {
207
- description: "Filename to generate or overwrite. Should be descriptive and follow a\nconsistent naming convention. Examples: \"01-service-overview.md\",\n\"02-user-requirements.md\", \"03-business-model.md\"",
208
- type: "string",
209
- pattern: "((.*)\\.md)$"
210
- },
211
- documentType: {
212
- description: "Document type that determines the structure and content guidelines. This\nhelps the AI understand what kind of document to create and what sections\nor information should be included. Examples:\n\n- \"requirement\": Functional/non-functional requirements, acceptance\n criteria\n- \"user-story\": User personas, scenarios, and journey descriptions\n- \"user-flow\": Step-by-step user interactions and decision points\n- \"business-model\": Revenue streams, cost structure, value propositions\n- \"service-overview\": High-level service description, goals, and scope",
213
- type: "string"
461
+ language: {
462
+ description: "Language for document content. When specified by the user, this takes\nprecedence over the locale setting for determining document language.",
463
+ type: "string"
464
+ },
465
+ page: {
466
+ description: "If the user has requested a specific number of pages, enter that number.\nOtherwise, provide an appropriate number of documents needed to meet the\nuser's requirements. This number must always match the length of the\nfiles property, must be greater than 1, and must include the table of\ncontents. For example, if the user requests 3 pages, the total should be\n4, including the table of contents.",
467
+ type: "number"
468
+ },
469
+ files: {
470
+ description: "Array of document metadata objects defining files to be generated.\n\nEach array element is an AutoBeAnalyzeFile.Scenario object containing:\n- filename: The output file name (e.g., \"01-service-overview.md\")\n- reason: Why this document is being created\n- documentType, outline, constraints, etc.: Metadata guiding content generation\n\nThese documents represent business-focused planning documentation:\n- Business requirements and functional specifications in natural language\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service overview and business model description\n- User actors and permission requirements (described in natural language)\n- Business logic and validation rules\n- DO NOT: Include database schemas, ERD, or API specifications\n- DO: Write all requirements in natural language for clarity\n\nGenerate metadata objects based on actual requirements gathered from conversation.\nDo not create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Array Length Rules\n\nThe array length must match the user's requested page count plus one for ToC.\nFor example: user requests 3 pages \u2192 generate 4 objects (1 ToC + 3 content).\nIf user does not specify a number, generate sufficient objects to adequately\ndocument the service (typically 11+ objects including ToC).",
471
+ type: "array",
472
+ items: {
473
+ $ref: "#/$defs/AutoBeAnalyzeFile.Scenario"
214
474
  },
215
- outline: {
216
- description: "Outline or table of contents that guides the document structure. Each\nitem represents a main section to be covered in the document. The AI will\nexpand each section with appropriate content while maintaining the\nspecified structure. Example: [\"Executive Summary\", \"Problem Statement\",\n\"Target Users\", \"Core Features\", \"Success Metrics\", \"Implementation\nTimeline\"]",
217
- type: "array",
218
- items: {
475
+ minItems: 1
476
+ }
477
+ },
478
+ required: [
479
+ "reason",
480
+ "prefix",
481
+ "actors",
482
+ "page",
483
+ "files"
484
+ ],
485
+ additionalProperties: false,
486
+ $defs: {
487
+ AutoBeAnalyzeActor: {
488
+ description: "Interface representing a user actor definition in the requirements analysis\nphase.\n\nThis interface defines authenticated user actors that will be used throughout\nthe application's authentication and authorization system. Each actor\nrepresents a distinct type of user who can register, authenticate, and\ninteract with the system based on their specific permissions and\ncapabilities.\n\nThe actors defined here serve as the foundation for generating:\n\n- Prisma schema models for user authentication tables\n- API endpoint access control decorators\n- Actor-based authorization logic in the business layer\n- Test scenarios for different user permission levels",
489
+ type: "object",
490
+ properties: {
491
+ name: {
492
+ description: "Unique identifier for the user actor.\n\nThis name will be used as a reference throughout the generated codebase,\nincluding Prisma schema model names, authorization decorator parameters,\nand API documentation.\n\nMUST use camelCase naming convention.",
493
+ type: "string",
494
+ pattern: "^[a-z][a-zA-Z0-9]*$",
495
+ minLength: 1
496
+ },
497
+ kind: {
498
+ description: "Actor category classification for system-wide permission hierarchy.\n\nThis property categorizes actors into three fundamental permission levels,\nestablishing a clear hierarchy for authorization decisions throughout the\napplication. The kind determines baseline access patterns and security\nboundaries:\n\n- \"guest\": Unauthenticated users or those with minimal permissions. Typically\n limited to public resources and registration/login endpoints.\n- \"member\": Authenticated users with standard access permissions. Can access\n personal resources and participate in core application features.\n- \"admin\": System administrators with elevated permissions. Can manage other\n users, access administrative functions, and modify system-wide settings.",
499
+ oneOf: [
500
+ {
501
+ "const": "guest"
502
+ },
503
+ {
504
+ "const": "member"
505
+ },
506
+ {
507
+ "const": "admin"
508
+ }
509
+ ]
510
+ },
511
+ description: {
512
+ description: "Human-readable description of the actor's permissions and capabilities.\n\nThis description helps the AI agents understand the business context and\naccess requirements for each actor, guiding the generation of appropriate\nauthorization rules and API endpoint restrictions.",
219
513
  type: "string"
220
514
  }
221
515
  },
222
- audience: {
223
- description: "Target audience for this document. Determines the language, technical\ndepth, and focus areas of the content. If not specified, the document\nwill be written for a general audience with balanced technical and\nbusiness perspectives. Examples:\n\n- \"development team\": More technical details, implementation considerations\n- \"business stakeholders\": Focus on ROI, business value, market opportunity\n- \"end users\": User-friendly language, benefits, and use cases\n- \"product managers\": Balance of user needs, business goals, and\n feasibility\n- \"general\": Accessible to all stakeholders (default if not specified)",
224
- type: "string"
225
- },
226
- keyQuestions: {
227
- description: "Key questions or concerns this document should address. Helps ensure the\ndocument covers all important aspects and doesn't miss critical\ninformation. The AI will make sure to answer these questions within the\ndocument content. Examples:\n\n- \"What problem does this service solve?\"\n- \"Who are the primary and secondary users?\"\n- \"What are the main competitive advantages?\"\n- \"How will we measure success?\"\n- \"What are the potential risks and mitigation strategies?\"",
228
- type: "array",
229
- items: {
516
+ required: [
517
+ "name",
518
+ "kind",
519
+ "description"
520
+ ]
521
+ },
522
+ "AutoBeAnalyzeFile.Scenario": {
523
+ type: "object",
524
+ properties: {
525
+ reason: {
526
+ description: "Describe briefly why you made this document, and if you have any plans\nfor the next one. This helps maintain context between documents and\nensures a logical flow in documentation creation. Example: \"To define the\ncore features and user needs for the e-commerce platform before moving on\nto detailed user flow documentation.\"",
230
527
  type: "string"
231
- }
232
- },
233
- detailLevel: {
234
- description: "Level of detail expected in the document. Guides how deeply the AI should\nexplore each topic and how much information to include. Examples:\n\n- \"high-level overview\": Brief, conceptual, focusing on the big picture\n- \"detailed specification\": Comprehensive, with specific examples and edge\n cases\n- \"executive summary\": Concise, focusing on key points and decisions\n- \"moderate detail\": Balanced approach with essential details (default)",
235
- type: "string"
236
- },
237
- relatedDocuments: {
238
- description: "Related documents that this document references or builds upon. Helps\nmaintain consistency across documentation and allows the AI to understand\nthe broader context. These documents should already exist or be planned\nin the documentation roadmap. Examples: [\"00-project-charter.md\",\n\"01-market-analysis.md\", \"02-competitor-research.md\"]",
239
- type: "array",
240
- items: {
528
+ },
529
+ filename: {
530
+ description: "Filename to generate or overwrite. Should be descriptive and follow a\nconsistent naming convention. Examples: \"01-service-overview.md\",\n\"02-user-requirements.md\", \"03-business-model.md\"",
531
+ type: "string",
532
+ pattern: "((.*)\\.md)$"
533
+ },
534
+ documentType: {
535
+ description: "Document type that determines the structure and content guidelines. This\nhelps the AI understand what kind of document to create and what sections\nor information should be included. Examples:\n\n- \"requirement\": Functional/non-functional requirements, acceptance\n criteria\n- \"user-story\": User personas, scenarios, and journey descriptions\n- \"user-flow\": Step-by-step user interactions and decision points\n- \"business-model\": Revenue streams, cost structure, value propositions\n- \"service-overview\": High-level service description, goals, and scope",
241
536
  type: "string"
242
- }
243
- },
244
- constraints: {
245
- description: "Specific constraints or requirements for the document. These are\nmust-have elements or considerations that should be included regardless\nof other factors. The AI will ensure these constraints are met.\nExamples:\n\n- \"Must include cost-benefit analysis\"\n- \"Focus on mobile-first user experience\"\n- \"Include measurable KPIs and success metrics\"\n- \"Address data privacy and security concerns\"\n- \"Consider scalability for 1M+ users\"\n- \"Include timeline and milestone recommendations\"",
246
- type: "array",
247
- items: {
537
+ },
538
+ outline: {
539
+ description: "Outline or table of contents that guides the document structure. Each\nitem represents a main section to be covered in the document. The AI will\nexpand each section with appropriate content while maintaining the\nspecified structure. Example: [\"Executive Summary\", \"Problem Statement\",\n\"Target Users\", \"Core Features\", \"Success Metrics\", \"Implementation\nTimeline\"]",
540
+ type: "array",
541
+ items: {
542
+ type: "string"
543
+ }
544
+ },
545
+ audience: {
546
+ description: "Target audience for this document. Determines the language, technical\ndepth, and focus areas of the content. If not specified, the document\nwill be written for a general audience with balanced technical and\nbusiness perspectives. Examples:\n\n- \"development team\": More technical details, implementation considerations\n- \"business stakeholders\": Focus on ROI, business value, market opportunity\n- \"end users\": User-friendly language, benefits, and use cases\n- \"product managers\": Balance of user needs, business goals, and\n feasibility\n- \"general\": Accessible to all stakeholders (default if not specified)",
547
+ type: "string"
548
+ },
549
+ keyQuestions: {
550
+ description: "Key questions or concerns this document should address. Helps ensure the\ndocument covers all important aspects and doesn't miss critical\ninformation. The AI will make sure to answer these questions within the\ndocument content. Examples:\n\n- \"What problem does this service solve?\"\n- \"Who are the primary and secondary users?\"\n- \"What are the main competitive advantages?\"\n- \"How will we measure success?\"\n- \"What are the potential risks and mitigation strategies?\"",
551
+ type: "array",
552
+ items: {
553
+ type: "string"
554
+ }
555
+ },
556
+ detailLevel: {
557
+ description: "Level of detail expected in the document. Guides how deeply the AI should\nexplore each topic and how much information to include. Examples:\n\n- \"high-level overview\": Brief, conceptual, focusing on the big picture\n- \"detailed specification\": Comprehensive, with specific examples and edge\n cases\n- \"executive summary\": Concise, focusing on key points and decisions\n- \"moderate detail\": Balanced approach with essential details (default)",
248
558
  type: "string"
559
+ },
560
+ relatedDocuments: {
561
+ description: "Related documents that this document references or builds upon. Helps\nmaintain consistency across documentation and allows the AI to understand\nthe broader context. These documents should already exist or be planned\nin the documentation roadmap. Examples: [\"00-project-charter.md\",\n\"01-market-analysis.md\", \"02-competitor-research.md\"]",
562
+ type: "array",
563
+ items: {
564
+ type: "string"
565
+ }
566
+ },
567
+ constraints: {
568
+ description: "Specific constraints or requirements for the document. These are\nmust-have elements or considerations that should be included regardless\nof other factors. The AI will ensure these constraints are met.\nExamples:\n\n- \"Must include cost-benefit analysis\"\n- \"Focus on mobile-first user experience\"\n- \"Include measurable KPIs and success metrics\"\n- \"Address data privacy and security concerns\"\n- \"Consider scalability for 1M+ users\"\n- \"Include timeline and milestone recommendations\"",
569
+ type: "array",
570
+ items: {
571
+ type: "string"
572
+ }
249
573
  }
250
- }
251
- },
252
- required: [
253
- "reason",
254
- "filename"
255
- ]
574
+ },
575
+ required: [
576
+ "reason",
577
+ "filename"
578
+ ]
579
+ }
256
580
  }
257
- }
258
- },
259
- description: "Compose project structure with actors and files.\n\nDesign a list of actors and initial documents that you need to create for\nthat requirement. Actors define user types and their responsibilities, while files\ndefine the documentation structure. These are managed separately. If you\ndetermine from the conversation that the user's requirements have not been\nfully gathered, you must stop the analysis and continue collecting the\nremaining requirements. In this case, you do not need to generate any files\nor actors. Simply pass an empty array to `input.files` and `input.actors`.",
260
- validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.prefix && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix)) && (Array.isArray(input.actors) && input.actors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (undefined === input.language || "string" === typeof input.language) && "number" === typeof input.page && (Array.isArray(input.files) && (1 <= input.files.length && input.files.every(elem => "object" === typeof elem && null !== elem && _io2(elem)))); const _io1 = input => "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && 1 <= input.name.length) && ("guest" === input.kind || "member" === input.kind || "admin" === input.kind) && "string" === typeof input.description; const _io2 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && (undefined === input.documentType || "string" === typeof input.documentType) && (undefined === input.outline || Array.isArray(input.outline) && input.outline.every(elem => "string" === typeof elem)) && (undefined === input.audience || "string" === typeof input.audience) && (undefined === input.keyQuestions || Array.isArray(input.keyQuestions) && input.keyQuestions.every(elem => "string" === typeof elem)) && (undefined === input.detailLevel || "string" === typeof input.detailLevel) && (undefined === input.relatedDocuments || Array.isArray(input.relatedDocuments) && input.relatedDocuments.every(elem => "string" === typeof elem)) && (undefined === input.constraints || Array.isArray(input.constraints) && input.constraints.every(elem => "string" === typeof elem)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
261
- path: _path + ".reason",
262
- expected: "string",
263
- value: input.reason
264
- }), "string" === typeof input.prefix && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix) || _report(_exceptionable, {
265
- path: _path + ".prefix",
266
- expected: "string & CamelCasePattern",
267
- value: input.prefix
268
- })) || _report(_exceptionable, {
269
- path: _path + ".prefix",
270
- expected: "(string & CamelCasePattern)",
271
- value: input.prefix
272
- }), (Array.isArray(input.actors) || _report(_exceptionable, {
273
- path: _path + ".actors",
274
- expected: "Array<AutoBeAnalyzeActor>",
275
- value: input.actors
276
- })) && input.actors.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
277
- path: _path + ".actors[" + _index7 + "]",
278
- expected: "AutoBeAnalyzeActor",
279
- value: elem
280
- })) && _vo1(elem, _path + ".actors[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
281
- path: _path + ".actors[" + _index7 + "]",
282
- expected: "AutoBeAnalyzeActor",
283
- value: elem
284
- })).every(flag => flag) || _report(_exceptionable, {
285
- path: _path + ".actors",
286
- expected: "Array<AutoBeAnalyzeActor>",
287
- value: input.actors
288
- }), undefined === input.language || "string" === typeof input.language || _report(_exceptionable, {
289
- path: _path + ".language",
290
- expected: "(string | undefined)",
291
- value: input.language
292
- }), "number" === typeof input.page || _report(_exceptionable, {
293
- path: _path + ".page",
294
- expected: "number",
295
- value: input.page
296
- }), (Array.isArray(input.files) || _report(_exceptionable, {
297
- path: _path + ".files",
298
- expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
299
- value: input.files
300
- })) && ((1 <= input.files.length || _report(_exceptionable, {
301
- path: _path + ".files",
302
- expected: "Array<> & MinItems<1>",
303
- value: input.files
304
- })) && input.files.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
305
- path: _path + ".files[" + _index8 + "]",
306
- expected: "AutoBeAnalyzeFile.Scenario",
307
- value: elem
308
- })) && _vo2(elem, _path + ".files[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
309
- path: _path + ".files[" + _index8 + "]",
310
- expected: "AutoBeAnalyzeFile.Scenario",
311
- value: elem
312
- })).every(flag => flag)) || _report(_exceptionable, {
313
- path: _path + ".files",
314
- expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
315
- value: input.files
316
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
317
- path: _path + ".name",
318
- expected: "string & CamelCasePattern",
319
- value: input.name
320
- })) && (1 <= input.name.length || _report(_exceptionable, {
321
- path: _path + ".name",
322
- expected: "string & MinLength<1>",
323
- value: input.name
324
- })) || _report(_exceptionable, {
325
- path: _path + ".name",
326
- expected: "(string & CamelCasePattern & MinLength<1>)",
327
- value: input.name
328
- }), "guest" === input.kind || "member" === input.kind || "admin" === input.kind || _report(_exceptionable, {
329
- path: _path + ".kind",
330
- expected: "(\"admin\" | \"guest\" | \"member\")",
331
- value: input.kind
332
- }), "string" === typeof input.description || _report(_exceptionable, {
333
- path: _path + ".description",
334
- expected: "string",
335
- value: input.description
336
- })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
337
- path: _path + ".reason",
338
- expected: "string",
339
- value: input.reason
340
- }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
341
- path: _path + ".filename",
342
- expected: "`${string}.md`",
343
- value: input.filename
344
- }), undefined === input.documentType || "string" === typeof input.documentType || _report(_exceptionable, {
345
- path: _path + ".documentType",
346
- expected: "(string | undefined)",
347
- value: input.documentType
348
- }), undefined === input.outline || (Array.isArray(input.outline) || _report(_exceptionable, {
349
- path: _path + ".outline",
350
- expected: "(Array<string> | undefined)",
351
- value: input.outline
352
- })) && input.outline.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
353
- path: _path + ".outline[" + _index9 + "]",
354
- expected: "string",
355
- value: elem
356
- })).every(flag => flag) || _report(_exceptionable, {
357
- path: _path + ".outline",
358
- expected: "(Array<string> | undefined)",
359
- value: input.outline
360
- }), undefined === input.audience || "string" === typeof input.audience || _report(_exceptionable, {
361
- path: _path + ".audience",
362
- expected: "(string | undefined)",
363
- value: input.audience
364
- }), undefined === input.keyQuestions || (Array.isArray(input.keyQuestions) || _report(_exceptionable, {
365
- path: _path + ".keyQuestions",
366
- expected: "(Array<string> | undefined)",
367
- value: input.keyQuestions
368
- })) && input.keyQuestions.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
369
- path: _path + ".keyQuestions[" + _index10 + "]",
370
- expected: "string",
371
- value: elem
372
- })).every(flag => flag) || _report(_exceptionable, {
373
- path: _path + ".keyQuestions",
374
- expected: "(Array<string> | undefined)",
375
- value: input.keyQuestions
376
- }), undefined === input.detailLevel || "string" === typeof input.detailLevel || _report(_exceptionable, {
377
- path: _path + ".detailLevel",
378
- expected: "(string | undefined)",
379
- value: input.detailLevel
380
- }), undefined === input.relatedDocuments || (Array.isArray(input.relatedDocuments) || _report(_exceptionable, {
381
- path: _path + ".relatedDocuments",
382
- expected: "(Array<string> | undefined)",
383
- value: input.relatedDocuments
384
- })) && input.relatedDocuments.map((elem, _index11) => "string" === typeof elem || _report(_exceptionable, {
385
- path: _path + ".relatedDocuments[" + _index11 + "]",
386
- expected: "string",
387
- value: elem
388
- })).every(flag => flag) || _report(_exceptionable, {
389
- path: _path + ".relatedDocuments",
390
- expected: "(Array<string> | undefined)",
391
- value: input.relatedDocuments
392
- }), undefined === input.constraints || (Array.isArray(input.constraints) || _report(_exceptionable, {
393
- path: _path + ".constraints",
394
- expected: "(Array<string> | undefined)",
395
- value: input.constraints
396
- })) && input.constraints.map((elem, _index12) => "string" === typeof elem || _report(_exceptionable, {
397
- path: _path + ".constraints[" + _index12 + "]",
398
- expected: "string",
399
- value: elem
400
- })).every(flag => flag) || _report(_exceptionable, {
401
- path: _path + ".constraints",
402
- expected: "(Array<string> | undefined)",
403
- value: input.constraints
404
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
405
- if (false === __is(input)) {
406
- errors = [];
407
- _report = __typia_transform__validateReport._validateReport(errors);
408
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
409
- path: _path + "",
410
- expected: "IAutoBeAnalyzeScenarioApplication.IProps",
411
- value: input
412
- })) && _vo0(input, _path + "", true) || _report(true, {
413
- path: _path + "",
414
- expected: "IAutoBeAnalyzeScenarioApplication.IProps",
415
- value: input
416
- }))(input, "$input", true);
417
- const success = 0 === errors.length;
418
- return success ? {
419
- success,
420
- data: input
421
- } : {
422
- success,
423
- errors,
581
+ },
582
+ description: "Composes project structure with actors and documentation files.\n\nDetermines the list of user actors and documents to generate based on\nrequirements. If requirements are incomplete, returns empty arrays.",
583
+ validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.prefix && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix)) && (Array.isArray(input.actors) && input.actors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (undefined === input.language || "string" === typeof input.language) && "number" === typeof input.page && (Array.isArray(input.files) && (1 <= input.files.length && input.files.every(elem => "object" === typeof elem && null !== elem && _io2(elem)))); const _io1 = input => "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && 1 <= input.name.length) && ("guest" === input.kind || "member" === input.kind || "admin" === input.kind) && "string" === typeof input.description; const _io2 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && (undefined === input.documentType || "string" === typeof input.documentType) && (undefined === input.outline || Array.isArray(input.outline) && input.outline.every(elem => "string" === typeof elem)) && (undefined === input.audience || "string" === typeof input.audience) && (undefined === input.keyQuestions || Array.isArray(input.keyQuestions) && input.keyQuestions.every(elem => "string" === typeof elem)) && (undefined === input.detailLevel || "string" === typeof input.detailLevel) && (undefined === input.relatedDocuments || Array.isArray(input.relatedDocuments) && input.relatedDocuments.every(elem => "string" === typeof elem)) && (undefined === input.constraints || Array.isArray(input.constraints) && input.constraints.every(elem => "string" === typeof elem)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
584
+ path: _path + ".reason",
585
+ expected: "string",
586
+ value: input.reason
587
+ }), "string" === typeof input.prefix && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix) || _report(_exceptionable, {
588
+ path: _path + ".prefix",
589
+ expected: "string & CamelCasePattern",
590
+ value: input.prefix
591
+ })) || _report(_exceptionable, {
592
+ path: _path + ".prefix",
593
+ expected: "(string & CamelCasePattern)",
594
+ value: input.prefix
595
+ }), (Array.isArray(input.actors) || _report(_exceptionable, {
596
+ path: _path + ".actors",
597
+ expected: "Array<AutoBeAnalyzeActor>",
598
+ value: input.actors
599
+ })) && input.actors.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
600
+ path: _path + ".actors[" + _index7 + "]",
601
+ expected: "AutoBeAnalyzeActor",
602
+ value: elem
603
+ })) && _vo1(elem, _path + ".actors[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
604
+ path: _path + ".actors[" + _index7 + "]",
605
+ expected: "AutoBeAnalyzeActor",
606
+ value: elem
607
+ })).every(flag => flag) || _report(_exceptionable, {
608
+ path: _path + ".actors",
609
+ expected: "Array<AutoBeAnalyzeActor>",
610
+ value: input.actors
611
+ }), undefined === input.language || "string" === typeof input.language || _report(_exceptionable, {
612
+ path: _path + ".language",
613
+ expected: "(string | undefined)",
614
+ value: input.language
615
+ }), "number" === typeof input.page || _report(_exceptionable, {
616
+ path: _path + ".page",
617
+ expected: "number",
618
+ value: input.page
619
+ }), (Array.isArray(input.files) || _report(_exceptionable, {
620
+ path: _path + ".files",
621
+ expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
622
+ value: input.files
623
+ })) && ((1 <= input.files.length || _report(_exceptionable, {
624
+ path: _path + ".files",
625
+ expected: "Array<> & MinItems<1>",
626
+ value: input.files
627
+ })) && input.files.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
628
+ path: _path + ".files[" + _index8 + "]",
629
+ expected: "AutoBeAnalyzeFile.Scenario",
630
+ value: elem
631
+ })) && _vo2(elem, _path + ".files[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
632
+ path: _path + ".files[" + _index8 + "]",
633
+ expected: "AutoBeAnalyzeFile.Scenario",
634
+ value: elem
635
+ })).every(flag => flag)) || _report(_exceptionable, {
636
+ path: _path + ".files",
637
+ expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
638
+ value: input.files
639
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
640
+ path: _path + ".name",
641
+ expected: "string & CamelCasePattern",
642
+ value: input.name
643
+ })) && (1 <= input.name.length || _report(_exceptionable, {
644
+ path: _path + ".name",
645
+ expected: "string & MinLength<1>",
646
+ value: input.name
647
+ })) || _report(_exceptionable, {
648
+ path: _path + ".name",
649
+ expected: "(string & CamelCasePattern & MinLength<1>)",
650
+ value: input.name
651
+ }), "guest" === input.kind || "member" === input.kind || "admin" === input.kind || _report(_exceptionable, {
652
+ path: _path + ".kind",
653
+ expected: "(\"admin\" | \"guest\" | \"member\")",
654
+ value: input.kind
655
+ }), "string" === typeof input.description || _report(_exceptionable, {
656
+ path: _path + ".description",
657
+ expected: "string",
658
+ value: input.description
659
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
660
+ path: _path + ".reason",
661
+ expected: "string",
662
+ value: input.reason
663
+ }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
664
+ path: _path + ".filename",
665
+ expected: "`${string}.md`",
666
+ value: input.filename
667
+ }), undefined === input.documentType || "string" === typeof input.documentType || _report(_exceptionable, {
668
+ path: _path + ".documentType",
669
+ expected: "(string | undefined)",
670
+ value: input.documentType
671
+ }), undefined === input.outline || (Array.isArray(input.outline) || _report(_exceptionable, {
672
+ path: _path + ".outline",
673
+ expected: "(Array<string> | undefined)",
674
+ value: input.outline
675
+ })) && input.outline.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
676
+ path: _path + ".outline[" + _index9 + "]",
677
+ expected: "string",
678
+ value: elem
679
+ })).every(flag => flag) || _report(_exceptionable, {
680
+ path: _path + ".outline",
681
+ expected: "(Array<string> | undefined)",
682
+ value: input.outline
683
+ }), undefined === input.audience || "string" === typeof input.audience || _report(_exceptionable, {
684
+ path: _path + ".audience",
685
+ expected: "(string | undefined)",
686
+ value: input.audience
687
+ }), undefined === input.keyQuestions || (Array.isArray(input.keyQuestions) || _report(_exceptionable, {
688
+ path: _path + ".keyQuestions",
689
+ expected: "(Array<string> | undefined)",
690
+ value: input.keyQuestions
691
+ })) && input.keyQuestions.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
692
+ path: _path + ".keyQuestions[" + _index10 + "]",
693
+ expected: "string",
694
+ value: elem
695
+ })).every(flag => flag) || _report(_exceptionable, {
696
+ path: _path + ".keyQuestions",
697
+ expected: "(Array<string> | undefined)",
698
+ value: input.keyQuestions
699
+ }), undefined === input.detailLevel || "string" === typeof input.detailLevel || _report(_exceptionable, {
700
+ path: _path + ".detailLevel",
701
+ expected: "(string | undefined)",
702
+ value: input.detailLevel
703
+ }), undefined === input.relatedDocuments || (Array.isArray(input.relatedDocuments) || _report(_exceptionable, {
704
+ path: _path + ".relatedDocuments",
705
+ expected: "(Array<string> | undefined)",
706
+ value: input.relatedDocuments
707
+ })) && input.relatedDocuments.map((elem, _index11) => "string" === typeof elem || _report(_exceptionable, {
708
+ path: _path + ".relatedDocuments[" + _index11 + "]",
709
+ expected: "string",
710
+ value: elem
711
+ })).every(flag => flag) || _report(_exceptionable, {
712
+ path: _path + ".relatedDocuments",
713
+ expected: "(Array<string> | undefined)",
714
+ value: input.relatedDocuments
715
+ }), undefined === input.constraints || (Array.isArray(input.constraints) || _report(_exceptionable, {
716
+ path: _path + ".constraints",
717
+ expected: "(Array<string> | undefined)",
718
+ value: input.constraints
719
+ })) && input.constraints.map((elem, _index12) => "string" === typeof elem || _report(_exceptionable, {
720
+ path: _path + ".constraints[" + _index12 + "]",
721
+ expected: "string",
722
+ value: elem
723
+ })).every(flag => flag) || _report(_exceptionable, {
724
+ path: _path + ".constraints",
725
+ expected: "(Array<string> | undefined)",
726
+ value: input.constraints
727
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
728
+ if (false === __is(input)) {
729
+ errors = [];
730
+ _report = __typia_transform__validateReport._validateReport(errors);
731
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
732
+ path: _path + "",
733
+ expected: "IAutoBeAnalyzeScenarioApplication.IProps",
734
+ value: input
735
+ })) && _vo0(input, _path + "", true) || _report(true, {
736
+ path: _path + "",
737
+ expected: "IAutoBeAnalyzeScenarioApplication.IProps",
738
+ value: input
739
+ }))(input, "$input", true);
740
+ const success = 0 === errors.length;
741
+ return success ? {
742
+ success,
743
+ data: input
744
+ } : {
745
+ success,
746
+ errors,
747
+ data: input
748
+ };
749
+ }
750
+ return {
751
+ success: true,
424
752
  data: input
425
753
  };
426
- }
427
- return {
428
- success: true,
429
- data: input
430
- };
431
- }; })()
432
- }
433
- ]
434
- };
435
- const collection = {
436
- chatgpt: {
437
- model: "chatgpt",
754
+ }; })()
755
+ }
756
+ ]
757
+ },
758
+ gemini: {
759
+ model: "gemini",
438
760
  options: {
439
761
  reference: true,
440
- strict: false,
441
762
  separate: null
442
763
  },
443
764
  functions: [
444
765
  {
445
766
  name: "compose",
446
767
  parameters: {
447
- description: " Prefix, actors, and files\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
768
+ description: " - Project prefix, actors, and file list\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
448
769
  type: "object",
449
770
  properties: {
450
771
  reason: {
@@ -456,7 +777,7 @@ const collection = {
456
777
  type: "string"
457
778
  },
458
779
  actors: {
459
- description: "Actors to be assigned for the project",
780
+ description: "Actors to be assigned for the project.\n\nEach actor has:\n\n- `name`: Actor identifier (camelCase)\n- `kind`: \"guest\" | \"member\" | \"admin\"\n- `description`: Actor's permissions and capabilities",
460
781
  type: "array",
461
782
  items: {
462
783
  $ref: "#/$defs/AutoBeAnalyzeActor"
@@ -471,7 +792,7 @@ const collection = {
471
792
  type: "number"
472
793
  },
473
794
  files: {
474
- description: "# Document files to be generated\n\nFile name must be English and it must contain the numbering and prefix.\n\nThese files represent business documentation that may include:\n\n- Business requirements and functional specifications in natural language\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service overview and business model description\n- User actors and permission requirements (described in natural language)\n- Business logic and validation rules\n- DO NOT: Include database schemas, ERD, or API specifications\n- DO: Write all requirements in natural language for clarity\n\nGenerate files based on actual requirements gathered from conversation.\nDo not create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Page Length Rules\n\nThe number of documents must match the user's request, excluding the\ntable of contents. For example, if the user requests 3 pages, a total of\n4 documents should be generated, including the table of contents. If the\nuser does not specify a number, generate a sufficient number of documents\nto adequately support the service.\n\n\n@minItems 1",
795
+ description: "Array of document metadata objects defining files to be generated.\n\nEach array element is an AutoBeAnalyzeFile.Scenario object containing:\n- filename: The output file name (e.g., \"01-service-overview.md\")\n- reason: Why this document is being created\n- documentType, outline, constraints, etc.: Metadata guiding content generation\n\nThese documents represent business-focused planning documentation:\n- Business requirements and functional specifications in natural language\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service overview and business model description\n- User actors and permission requirements (described in natural language)\n- Business logic and validation rules\n- DO NOT: Include database schemas, ERD, or API specifications\n- DO: Write all requirements in natural language for clarity\n\nGenerate metadata objects based on actual requirements gathered from conversation.\nDo not create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Array Length Rules\n\nThe array length must match the user's requested page count plus one for ToC.\nFor example: user requests 3 pages \u2192 generate 4 objects (1 ToC + 3 content).\nIf user does not specify a number, generate sufficient objects to adequately\ndocument the service (typically 11+ objects including ToC).\n\n\n@minItems 1",
475
796
  type: "array",
476
797
  items: {
477
798
  $ref: "#/$defs/AutoBeAnalyzeFile.Scenario"
@@ -574,7 +895,7 @@ const collection = {
574
895
  }
575
896
  }
576
897
  },
577
- description: "Compose project structure with actors and files.\n\nDesign a list of actors and initial documents that you need to create for\nthat requirement. Actors define user types and their responsibilities, while files\ndefine the documentation structure. These are managed separately. If you\ndetermine from the conversation that the user's requirements have not been\nfully gathered, you must stop the analysis and continue collecting the\nremaining requirements. In this case, you do not need to generate any files\nor actors. Simply pass an empty array to `input.files` and `input.actors`.",
898
+ description: "Composes project structure with actors and documentation files.\n\nDetermines the list of user actors and documents to generate based on\nrequirements. If requirements are incomplete, returns empty arrays.",
578
899
  validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.prefix && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix)) && (Array.isArray(input.actors) && input.actors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (undefined === input.language || "string" === typeof input.language) && "number" === typeof input.page && (Array.isArray(input.files) && (1 <= input.files.length && input.files.every(elem => "object" === typeof elem && null !== elem && _io2(elem)))); const _io1 = input => "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && 1 <= input.name.length) && ("guest" === input.kind || "member" === input.kind || "admin" === input.kind) && "string" === typeof input.description; const _io2 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && (undefined === input.documentType || "string" === typeof input.documentType) && (undefined === input.outline || Array.isArray(input.outline) && input.outline.every(elem => "string" === typeof elem)) && (undefined === input.audience || "string" === typeof input.audience) && (undefined === input.keyQuestions || Array.isArray(input.keyQuestions) && input.keyQuestions.every(elem => "string" === typeof elem)) && (undefined === input.detailLevel || "string" === typeof input.detailLevel) && (undefined === input.relatedDocuments || Array.isArray(input.relatedDocuments) && input.relatedDocuments.every(elem => "string" === typeof elem)) && (undefined === input.constraints || Array.isArray(input.constraints) && input.constraints.every(elem => "string" === typeof elem)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
579
900
  path: _path + ".reason",
580
901
  expected: "string",
@@ -750,9 +1071,5 @@ const collection = {
750
1071
  }
751
1072
  ]
752
1073
  },
753
- claude,
754
- llama: claude,
755
- deepseek: claude,
756
- "3.1": claude,
757
1074
  };
758
1075
  //# sourceMappingURL=orchestrateAnalyzeScenario.js.map