@autobe/agent 0.27.0 → 0.28.1
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.
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +1 -1
- package/lib/context/assertSchemaModel.d.ts +1 -1
- package/lib/context/assertSchemaModel.js +4 -7
- package/lib/context/assertSchemaModel.js.map +1 -1
- package/lib/index.mjs +18186 -7689
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +164 -86
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +656 -335
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +143 -74
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +17 -52
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +25 -22
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +7 -23
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +165 -2
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/orchestrate/facade/createAutoBeFacadeController.js +773 -403
- package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +749 -2
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +1637 -9
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +252 -133
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +258 -135
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +342 -226
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +633 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +785 -3
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +206 -3
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +107 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1676 -9
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +1637 -9
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +397 -201
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1184 -599
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +1202 -608
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +4 -2
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +369 -185
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +405 -203
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +130 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +165 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +130 -2
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +131 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +166 -2
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +257 -3
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +283 -3
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +139 -2
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/package.json +9 -9
- package/src/constants/AutoBeSystemPromptConstant.ts +1 -1
- package/src/context/assertSchemaModel.ts +5 -8
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +7 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +13 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +7 -9
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +19 -54
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +25 -22
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +8 -24
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +15 -1
- package/src/orchestrate/facade/createAutoBeFacadeController.ts +7 -6
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +17 -14
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +14 -1
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +11 -1
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +9 -1
- package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +14 -1
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +11 -1
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +13 -9
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +7 -9
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +7 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +13 -9
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +13 -9
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +11 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +15 -1
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -1
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +5 -1
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +1 -1
- package/src/orchestrate/test/orchestrateTestCorrect.ts +11 -1
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +18 -1
- package/src/orchestrate/test/orchestrateTestScenario.ts +11 -1
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +11 -1
- package/src/orchestrate/test/orchestrateTestWrite.ts +11 -1
|
@@ -95,7 +95,11 @@ const orchestrateAnalyzeScenario = (ctx) => __awaiter(void 0, void 0, void 0, fu
|
|
|
95
95
|
exports.orchestrateAnalyzeScenario = orchestrateAnalyzeScenario;
|
|
96
96
|
function createController(props) {
|
|
97
97
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
98
|
-
const application = collection[props.model
|
|
98
|
+
const application = collection[props.model === "chatgpt"
|
|
99
|
+
? "chatgpt"
|
|
100
|
+
: props.model === "gemini"
|
|
101
|
+
? "gemini"
|
|
102
|
+
: "claude"];
|
|
99
103
|
return {
|
|
100
104
|
protocol: "class",
|
|
101
105
|
name: "Compose",
|
|
@@ -107,332 +111,6 @@ function createController(props) {
|
|
|
107
111
|
},
|
|
108
112
|
};
|
|
109
113
|
}
|
|
110
|
-
const claude = {
|
|
111
|
-
model: "claude",
|
|
112
|
-
options: {
|
|
113
|
-
reference: true,
|
|
114
|
-
separate: null
|
|
115
|
-
},
|
|
116
|
-
functions: [
|
|
117
|
-
{
|
|
118
|
-
name: "compose",
|
|
119
|
-
parameters: {
|
|
120
|
-
description: " Prefix, actors, and files\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
|
|
121
|
-
type: "object",
|
|
122
|
-
properties: {
|
|
123
|
-
reason: {
|
|
124
|
-
description: "Reason for the analysis and composition of the project structure.",
|
|
125
|
-
type: "string"
|
|
126
|
-
},
|
|
127
|
-
prefix: {
|
|
128
|
-
description: "Prefix for file names and variable names. This will be used for\norganizing documentation files.\n\nDO: Use camelCase naming convention.",
|
|
129
|
-
type: "string",
|
|
130
|
-
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
131
|
-
},
|
|
132
|
-
actors: {
|
|
133
|
-
description: "Actors to be assigned for the project",
|
|
134
|
-
type: "array",
|
|
135
|
-
items: {
|
|
136
|
-
$ref: "#/$defs/AutoBeAnalyzeActor"
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
language: {
|
|
140
|
-
description: "Language for document content. When specified by the user, this takes\nprecedence over the locale setting for determining document language.",
|
|
141
|
-
type: "string"
|
|
142
|
-
},
|
|
143
|
-
page: {
|
|
144
|
-
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.",
|
|
145
|
-
type: "number"
|
|
146
|
-
},
|
|
147
|
-
files: {
|
|
148
|
-
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.",
|
|
149
|
-
type: "array",
|
|
150
|
-
items: {
|
|
151
|
-
$ref: "#/$defs/AutoBeAnalyzeFile.Scenario"
|
|
152
|
-
},
|
|
153
|
-
minItems: 1
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
required: [
|
|
157
|
-
"reason",
|
|
158
|
-
"prefix",
|
|
159
|
-
"actors",
|
|
160
|
-
"page",
|
|
161
|
-
"files"
|
|
162
|
-
],
|
|
163
|
-
additionalProperties: false,
|
|
164
|
-
$defs: {
|
|
165
|
-
AutoBeAnalyzeActor: {
|
|
166
|
-
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",
|
|
167
|
-
type: "object",
|
|
168
|
-
properties: {
|
|
169
|
-
name: {
|
|
170
|
-
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.",
|
|
171
|
-
type: "string",
|
|
172
|
-
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
173
|
-
minLength: 1
|
|
174
|
-
},
|
|
175
|
-
kind: {
|
|
176
|
-
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.",
|
|
177
|
-
oneOf: [
|
|
178
|
-
{
|
|
179
|
-
"const": "guest"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"const": "member"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"const": "admin"
|
|
186
|
-
}
|
|
187
|
-
]
|
|
188
|
-
},
|
|
189
|
-
description: {
|
|
190
|
-
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.",
|
|
191
|
-
type: "string"
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
required: [
|
|
195
|
-
"name",
|
|
196
|
-
"kind",
|
|
197
|
-
"description"
|
|
198
|
-
]
|
|
199
|
-
},
|
|
200
|
-
"AutoBeAnalyzeFile.Scenario": {
|
|
201
|
-
type: "object",
|
|
202
|
-
properties: {
|
|
203
|
-
reason: {
|
|
204
|
-
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.\"",
|
|
205
|
-
type: "string"
|
|
206
|
-
},
|
|
207
|
-
filename: {
|
|
208
|
-
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\"",
|
|
209
|
-
type: "string",
|
|
210
|
-
pattern: "((.*)\\.md)$"
|
|
211
|
-
},
|
|
212
|
-
documentType: {
|
|
213
|
-
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",
|
|
214
|
-
type: "string"
|
|
215
|
-
},
|
|
216
|
-
outline: {
|
|
217
|
-
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\"]",
|
|
218
|
-
type: "array",
|
|
219
|
-
items: {
|
|
220
|
-
type: "string"
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
audience: {
|
|
224
|
-
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)",
|
|
225
|
-
type: "string"
|
|
226
|
-
},
|
|
227
|
-
keyQuestions: {
|
|
228
|
-
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?\"",
|
|
229
|
-
type: "array",
|
|
230
|
-
items: {
|
|
231
|
-
type: "string"
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
detailLevel: {
|
|
235
|
-
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)",
|
|
236
|
-
type: "string"
|
|
237
|
-
},
|
|
238
|
-
relatedDocuments: {
|
|
239
|
-
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\"]",
|
|
240
|
-
type: "array",
|
|
241
|
-
items: {
|
|
242
|
-
type: "string"
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
constraints: {
|
|
246
|
-
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\"",
|
|
247
|
-
type: "array",
|
|
248
|
-
items: {
|
|
249
|
-
type: "string"
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
required: [
|
|
254
|
-
"reason",
|
|
255
|
-
"filename"
|
|
256
|
-
]
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
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`.",
|
|
261
|
-
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, {
|
|
262
|
-
path: _path + ".reason",
|
|
263
|
-
expected: "string",
|
|
264
|
-
value: input.reason
|
|
265
|
-
}), "string" === typeof input.prefix && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.prefix) || _report(_exceptionable, {
|
|
266
|
-
path: _path + ".prefix",
|
|
267
|
-
expected: "string & CamelCasePattern",
|
|
268
|
-
value: input.prefix
|
|
269
|
-
})) || _report(_exceptionable, {
|
|
270
|
-
path: _path + ".prefix",
|
|
271
|
-
expected: "(string & CamelCasePattern)",
|
|
272
|
-
value: input.prefix
|
|
273
|
-
}), (Array.isArray(input.actors) || _report(_exceptionable, {
|
|
274
|
-
path: _path + ".actors",
|
|
275
|
-
expected: "Array<AutoBeAnalyzeActor>",
|
|
276
|
-
value: input.actors
|
|
277
|
-
})) && input.actors.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
278
|
-
path: _path + ".actors[" + _index7 + "]",
|
|
279
|
-
expected: "AutoBeAnalyzeActor",
|
|
280
|
-
value: elem
|
|
281
|
-
})) && _vo1(elem, _path + ".actors[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
282
|
-
path: _path + ".actors[" + _index7 + "]",
|
|
283
|
-
expected: "AutoBeAnalyzeActor",
|
|
284
|
-
value: elem
|
|
285
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
286
|
-
path: _path + ".actors",
|
|
287
|
-
expected: "Array<AutoBeAnalyzeActor>",
|
|
288
|
-
value: input.actors
|
|
289
|
-
}), undefined === input.language || "string" === typeof input.language || _report(_exceptionable, {
|
|
290
|
-
path: _path + ".language",
|
|
291
|
-
expected: "(string | undefined)",
|
|
292
|
-
value: input.language
|
|
293
|
-
}), "number" === typeof input.page || _report(_exceptionable, {
|
|
294
|
-
path: _path + ".page",
|
|
295
|
-
expected: "number",
|
|
296
|
-
value: input.page
|
|
297
|
-
}), (Array.isArray(input.files) || _report(_exceptionable, {
|
|
298
|
-
path: _path + ".files",
|
|
299
|
-
expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
|
|
300
|
-
value: input.files
|
|
301
|
-
})) && ((1 <= input.files.length || _report(_exceptionable, {
|
|
302
|
-
path: _path + ".files",
|
|
303
|
-
expected: "Array<> & MinItems<1>",
|
|
304
|
-
value: input.files
|
|
305
|
-
})) && input.files.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
306
|
-
path: _path + ".files[" + _index8 + "]",
|
|
307
|
-
expected: "AutoBeAnalyzeFile.Scenario",
|
|
308
|
-
value: elem
|
|
309
|
-
})) && _vo2(elem, _path + ".files[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
310
|
-
path: _path + ".files[" + _index8 + "]",
|
|
311
|
-
expected: "AutoBeAnalyzeFile.Scenario",
|
|
312
|
-
value: elem
|
|
313
|
-
})).every(flag => flag)) || _report(_exceptionable, {
|
|
314
|
-
path: _path + ".files",
|
|
315
|
-
expected: "(Array<AutoBeAnalyzeFile.Scenario> & MinItems<1>)",
|
|
316
|
-
value: input.files
|
|
317
|
-
})].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, {
|
|
318
|
-
path: _path + ".name",
|
|
319
|
-
expected: "string & CamelCasePattern",
|
|
320
|
-
value: input.name
|
|
321
|
-
})) && (1 <= input.name.length || _report(_exceptionable, {
|
|
322
|
-
path: _path + ".name",
|
|
323
|
-
expected: "string & MinLength<1>",
|
|
324
|
-
value: input.name
|
|
325
|
-
})) || _report(_exceptionable, {
|
|
326
|
-
path: _path + ".name",
|
|
327
|
-
expected: "(string & CamelCasePattern & MinLength<1>)",
|
|
328
|
-
value: input.name
|
|
329
|
-
}), "guest" === input.kind || "member" === input.kind || "admin" === input.kind || _report(_exceptionable, {
|
|
330
|
-
path: _path + ".kind",
|
|
331
|
-
expected: "(\"admin\" | \"guest\" | \"member\")",
|
|
332
|
-
value: input.kind
|
|
333
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
334
|
-
path: _path + ".description",
|
|
335
|
-
expected: "string",
|
|
336
|
-
value: input.description
|
|
337
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
|
|
338
|
-
path: _path + ".reason",
|
|
339
|
-
expected: "string",
|
|
340
|
-
value: input.reason
|
|
341
|
-
}), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
|
|
342
|
-
path: _path + ".filename",
|
|
343
|
-
expected: "`${string}.md`",
|
|
344
|
-
value: input.filename
|
|
345
|
-
}), undefined === input.documentType || "string" === typeof input.documentType || _report(_exceptionable, {
|
|
346
|
-
path: _path + ".documentType",
|
|
347
|
-
expected: "(string | undefined)",
|
|
348
|
-
value: input.documentType
|
|
349
|
-
}), undefined === input.outline || (Array.isArray(input.outline) || _report(_exceptionable, {
|
|
350
|
-
path: _path + ".outline",
|
|
351
|
-
expected: "(Array<string> | undefined)",
|
|
352
|
-
value: input.outline
|
|
353
|
-
})) && input.outline.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
|
|
354
|
-
path: _path + ".outline[" + _index9 + "]",
|
|
355
|
-
expected: "string",
|
|
356
|
-
value: elem
|
|
357
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
358
|
-
path: _path + ".outline",
|
|
359
|
-
expected: "(Array<string> | undefined)",
|
|
360
|
-
value: input.outline
|
|
361
|
-
}), undefined === input.audience || "string" === typeof input.audience || _report(_exceptionable, {
|
|
362
|
-
path: _path + ".audience",
|
|
363
|
-
expected: "(string | undefined)",
|
|
364
|
-
value: input.audience
|
|
365
|
-
}), undefined === input.keyQuestions || (Array.isArray(input.keyQuestions) || _report(_exceptionable, {
|
|
366
|
-
path: _path + ".keyQuestions",
|
|
367
|
-
expected: "(Array<string> | undefined)",
|
|
368
|
-
value: input.keyQuestions
|
|
369
|
-
})) && input.keyQuestions.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
|
|
370
|
-
path: _path + ".keyQuestions[" + _index10 + "]",
|
|
371
|
-
expected: "string",
|
|
372
|
-
value: elem
|
|
373
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
374
|
-
path: _path + ".keyQuestions",
|
|
375
|
-
expected: "(Array<string> | undefined)",
|
|
376
|
-
value: input.keyQuestions
|
|
377
|
-
}), undefined === input.detailLevel || "string" === typeof input.detailLevel || _report(_exceptionable, {
|
|
378
|
-
path: _path + ".detailLevel",
|
|
379
|
-
expected: "(string | undefined)",
|
|
380
|
-
value: input.detailLevel
|
|
381
|
-
}), undefined === input.relatedDocuments || (Array.isArray(input.relatedDocuments) || _report(_exceptionable, {
|
|
382
|
-
path: _path + ".relatedDocuments",
|
|
383
|
-
expected: "(Array<string> | undefined)",
|
|
384
|
-
value: input.relatedDocuments
|
|
385
|
-
})) && input.relatedDocuments.map((elem, _index11) => "string" === typeof elem || _report(_exceptionable, {
|
|
386
|
-
path: _path + ".relatedDocuments[" + _index11 + "]",
|
|
387
|
-
expected: "string",
|
|
388
|
-
value: elem
|
|
389
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
390
|
-
path: _path + ".relatedDocuments",
|
|
391
|
-
expected: "(Array<string> | undefined)",
|
|
392
|
-
value: input.relatedDocuments
|
|
393
|
-
}), undefined === input.constraints || (Array.isArray(input.constraints) || _report(_exceptionable, {
|
|
394
|
-
path: _path + ".constraints",
|
|
395
|
-
expected: "(Array<string> | undefined)",
|
|
396
|
-
value: input.constraints
|
|
397
|
-
})) && input.constraints.map((elem, _index12) => "string" === typeof elem || _report(_exceptionable, {
|
|
398
|
-
path: _path + ".constraints[" + _index12 + "]",
|
|
399
|
-
expected: "string",
|
|
400
|
-
value: elem
|
|
401
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
402
|
-
path: _path + ".constraints",
|
|
403
|
-
expected: "(Array<string> | undefined)",
|
|
404
|
-
value: input.constraints
|
|
405
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
406
|
-
if (false === __is(input)) {
|
|
407
|
-
errors = [];
|
|
408
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
409
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
410
|
-
path: _path + "",
|
|
411
|
-
expected: "IAutoBeAnalyzeScenarioApplication.IProps",
|
|
412
|
-
value: input
|
|
413
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
414
|
-
path: _path + "",
|
|
415
|
-
expected: "IAutoBeAnalyzeScenarioApplication.IProps",
|
|
416
|
-
value: input
|
|
417
|
-
}))(input, "$input", true);
|
|
418
|
-
const success = 0 === errors.length;
|
|
419
|
-
return success ? {
|
|
420
|
-
success,
|
|
421
|
-
data: input
|
|
422
|
-
} : {
|
|
423
|
-
success,
|
|
424
|
-
errors,
|
|
425
|
-
data: input
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
return {
|
|
429
|
-
success: true,
|
|
430
|
-
data: input
|
|
431
|
-
};
|
|
432
|
-
}; })()
|
|
433
|
-
}
|
|
434
|
-
]
|
|
435
|
-
};
|
|
436
114
|
const collection = {
|
|
437
115
|
chatgpt: {
|
|
438
116
|
model: "chatgpt",
|
|
@@ -445,7 +123,7 @@ const collection = {
|
|
|
445
123
|
{
|
|
446
124
|
name: "compose",
|
|
447
125
|
parameters: {
|
|
448
|
-
description: "
|
|
126
|
+
description: " - Project prefix, actors, and file list\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
|
|
449
127
|
type: "object",
|
|
450
128
|
properties: {
|
|
451
129
|
reason: {
|
|
@@ -457,7 +135,7 @@ const collection = {
|
|
|
457
135
|
type: "string"
|
|
458
136
|
},
|
|
459
137
|
actors: {
|
|
460
|
-
description: "Actors to be assigned for the project",
|
|
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",
|
|
461
139
|
type: "array",
|
|
462
140
|
items: {
|
|
463
141
|
$ref: "#/$defs/AutoBeAnalyzeActor"
|
|
@@ -472,7 +150,7 @@ const collection = {
|
|
|
472
150
|
type: "number"
|
|
473
151
|
},
|
|
474
152
|
files: {
|
|
475
|
-
description: "
|
|
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",
|
|
476
154
|
type: "array",
|
|
477
155
|
items: {
|
|
478
156
|
$ref: "#/$defs/AutoBeAnalyzeFile.Scenario"
|
|
@@ -575,7 +253,654 @@ const collection = {
|
|
|
575
253
|
}
|
|
576
254
|
}
|
|
577
255
|
},
|
|
578
|
-
description: "
|
|
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"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
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"
|
|
474
|
+
},
|
|
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.",
|
|
513
|
+
type: "string"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
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.\"",
|
|
527
|
+
type: "string"
|
|
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",
|
|
536
|
+
type: "string"
|
|
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)",
|
|
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
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
required: [
|
|
576
|
+
"reason",
|
|
577
|
+
"filename"
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
}
|
|
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,
|
|
752
|
+
data: input
|
|
753
|
+
};
|
|
754
|
+
}; })()
|
|
755
|
+
}
|
|
756
|
+
]
|
|
757
|
+
},
|
|
758
|
+
gemini: {
|
|
759
|
+
model: "gemini",
|
|
760
|
+
options: {
|
|
761
|
+
reference: true,
|
|
762
|
+
separate: null
|
|
763
|
+
},
|
|
764
|
+
functions: [
|
|
765
|
+
{
|
|
766
|
+
name: "compose",
|
|
767
|
+
parameters: {
|
|
768
|
+
description: " - Project prefix, actors, and file list\n\n------------------------------\n\nCurrent Type: {@link IAutoBeAnalyzeScenarioApplication.IProps}",
|
|
769
|
+
type: "object",
|
|
770
|
+
properties: {
|
|
771
|
+
reason: {
|
|
772
|
+
description: "Reason for the analysis and composition of the project structure.",
|
|
773
|
+
type: "string"
|
|
774
|
+
},
|
|
775
|
+
prefix: {
|
|
776
|
+
description: "Prefix for file names and variable names. This will be used for\norganizing documentation files.\n\nDO: Use camelCase naming convention.",
|
|
777
|
+
type: "string",
|
|
778
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
779
|
+
},
|
|
780
|
+
actors: {
|
|
781
|
+
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",
|
|
782
|
+
type: "array",
|
|
783
|
+
items: {
|
|
784
|
+
$ref: "#/$defs/AutoBeAnalyzeActor"
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
language: {
|
|
788
|
+
description: "Language for document content. When specified by the user, this takes\nprecedence over the locale setting for determining document language.",
|
|
789
|
+
type: "string"
|
|
790
|
+
},
|
|
791
|
+
page: {
|
|
792
|
+
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.",
|
|
793
|
+
type: "number"
|
|
794
|
+
},
|
|
795
|
+
files: {
|
|
796
|
+
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).",
|
|
797
|
+
type: "array",
|
|
798
|
+
items: {
|
|
799
|
+
$ref: "#/$defs/AutoBeAnalyzeFile.Scenario"
|
|
800
|
+
},
|
|
801
|
+
minItems: 1
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
required: [
|
|
805
|
+
"reason",
|
|
806
|
+
"prefix",
|
|
807
|
+
"actors",
|
|
808
|
+
"page",
|
|
809
|
+
"files"
|
|
810
|
+
],
|
|
811
|
+
additionalProperties: false,
|
|
812
|
+
$defs: {
|
|
813
|
+
AutoBeAnalyzeActor: {
|
|
814
|
+
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",
|
|
815
|
+
type: "object",
|
|
816
|
+
properties: {
|
|
817
|
+
name: {
|
|
818
|
+
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.",
|
|
819
|
+
type: "string",
|
|
820
|
+
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
821
|
+
minLength: 1
|
|
822
|
+
},
|
|
823
|
+
kind: {
|
|
824
|
+
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.",
|
|
825
|
+
type: "string",
|
|
826
|
+
"enum": [
|
|
827
|
+
"guest",
|
|
828
|
+
"member",
|
|
829
|
+
"admin"
|
|
830
|
+
]
|
|
831
|
+
},
|
|
832
|
+
description: {
|
|
833
|
+
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.",
|
|
834
|
+
type: "string"
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
required: [
|
|
838
|
+
"name",
|
|
839
|
+
"kind",
|
|
840
|
+
"description"
|
|
841
|
+
]
|
|
842
|
+
},
|
|
843
|
+
"AutoBeAnalyzeFile.Scenario": {
|
|
844
|
+
type: "object",
|
|
845
|
+
properties: {
|
|
846
|
+
reason: {
|
|
847
|
+
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.\"",
|
|
848
|
+
type: "string"
|
|
849
|
+
},
|
|
850
|
+
filename: {
|
|
851
|
+
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\"",
|
|
852
|
+
type: "string",
|
|
853
|
+
pattern: "((.*)\\.md)$"
|
|
854
|
+
},
|
|
855
|
+
documentType: {
|
|
856
|
+
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",
|
|
857
|
+
type: "string"
|
|
858
|
+
},
|
|
859
|
+
outline: {
|
|
860
|
+
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\"]",
|
|
861
|
+
type: "array",
|
|
862
|
+
items: {
|
|
863
|
+
type: "string"
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
audience: {
|
|
867
|
+
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)",
|
|
868
|
+
type: "string"
|
|
869
|
+
},
|
|
870
|
+
keyQuestions: {
|
|
871
|
+
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?\"",
|
|
872
|
+
type: "array",
|
|
873
|
+
items: {
|
|
874
|
+
type: "string"
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
detailLevel: {
|
|
878
|
+
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)",
|
|
879
|
+
type: "string"
|
|
880
|
+
},
|
|
881
|
+
relatedDocuments: {
|
|
882
|
+
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\"]",
|
|
883
|
+
type: "array",
|
|
884
|
+
items: {
|
|
885
|
+
type: "string"
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
constraints: {
|
|
889
|
+
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\"",
|
|
890
|
+
type: "array",
|
|
891
|
+
items: {
|
|
892
|
+
type: "string"
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
required: [
|
|
897
|
+
"reason",
|
|
898
|
+
"filename"
|
|
899
|
+
]
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
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.",
|
|
579
904
|
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, {
|
|
580
905
|
path: _path + ".reason",
|
|
581
906
|
expected: "string",
|
|
@@ -751,9 +1076,5 @@ const collection = {
|
|
|
751
1076
|
}
|
|
752
1077
|
]
|
|
753
1078
|
},
|
|
754
|
-
claude,
|
|
755
|
-
llama: claude,
|
|
756
|
-
deepseek: claude,
|
|
757
|
-
"3.1": claude,
|
|
758
1079
|
};
|
|
759
1080
|
//# sourceMappingURL=orchestrateAnalyzeScenario.js.map
|