@autobe/agent 0.30.4 → 0.30.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -4
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/describe/image/orchestrateImageDescribeDraft.js +6 -6
- package/lib/describe/image/structures/IAutoBeImageDescribeDraftApplication.d.ts +12 -63
- package/lib/index.mjs +2918 -2842
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js +8 -8
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +36 -37
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenarioReview.js +7 -7
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js +55 -42
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js +67 -54
- package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js +24 -25
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js +24 -25
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js +30 -31
- package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.d.ts +14 -52
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +23 -96
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.d.ts +12 -40
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.d.ts +30 -88
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.d.ts +35 -94
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.d.ts +23 -93
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.d.ts +15 -88
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js +76 -31
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +7 -7
- package/lib/orchestrate/common/structures/IAnalysisSectionEntry.d.ts +2 -8
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +8 -50
- package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +1 -9
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.d.ts +4 -23
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.d.ts +3 -21
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +4 -22
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +4 -22
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.d.ts +5 -17
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.d.ts +7 -76
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.d.ts +6 -89
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.d.ts +7 -93
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.d.ts +3 -22
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.d.ts +3 -22
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js +114 -139
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +90 -91
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js +58 -59
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +58 -59
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperation.js +108 -132
- package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js +72 -72
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +76 -77
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js +130 -159
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js +126 -155
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js +114 -142
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +5 -5
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +100 -129
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js +120 -149
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.d.ts +10 -97
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +14 -83
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.d.ts +12 -90
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +12 -80
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +21 -116
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.d.ts +24 -112
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +11 -83
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +11 -76
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.d.ts +18 -96
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.d.ts +11 -76
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.d.ts +25 -107
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +5 -31
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.d.ts +6 -42
- package/lib/orchestrate/prisma/orchestratePrismaAuthorization.js +41 -41
- package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js +62 -63
- package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +40 -41
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js +60 -61
- package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +112 -116
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaGroup.js +48 -49
- package/lib/orchestrate/prisma/orchestratePrismaGroup.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js +70 -71
- package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +118 -122
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js +126 -131
- package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js.map +1 -1
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.d.ts +22 -99
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.d.ts +12 -109
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.d.ts +14 -100
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.d.ts +15 -108
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.d.ts +24 -106
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.d.ts +13 -76
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.d.ts +13 -111
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.d.ts +26 -97
- package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.d.ts +16 -93
- package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js +20 -2
- package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js +22 -2
- package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js.map +1 -1
- package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectCasting.js +7 -7
- package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js +86 -6
- package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +38 -38
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +34 -34
- package/lib/orchestrate/realize/orchestrateRealizeCollectorCorrectOverall.js +38 -38
- package/lib/orchestrate/realize/orchestrateRealizeCollectorPlan.js +54 -54
- package/lib/orchestrate/realize/orchestrateRealizeCollectorWrite.js +36 -36
- package/lib/orchestrate/realize/orchestrateRealizeOperationCorrectOverall.js +44 -44
- package/lib/orchestrate/realize/orchestrateRealizeOperationWrite.js +42 -42
- package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectOverall.js +46 -46
- package/lib/orchestrate/realize/orchestrateRealizeTransformerPlan.js +36 -36
- package/lib/orchestrate/realize/orchestrateRealizeTransformerWrite.js +44 -44
- package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.d.ts +18 -0
- package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js +167 -8
- package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +17 -71
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.d.ts +32 -92
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.d.ts +32 -114
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.d.ts +29 -106
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.d.ts +38 -131
- package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.d.ts +16 -71
- package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.d.ts +16 -73
- package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.d.ts +37 -155
- package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.d.ts +25 -88
- package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.d.ts +48 -181
- package/lib/orchestrate/realize/utils/generateTS2339Hints.d.ts +5 -3
- package/lib/orchestrate/realize/utils/generateTS2339Hints.js +37 -19
- package/lib/orchestrate/realize/utils/generateTS2339Hints.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestOperationWriteHistory.js +2 -2
- package/lib/orchestrate/test/orchestrateTestScenario.js +22 -22
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +22 -22
- package/package.json +5 -5
- package/src/constants/AutoBeSystemPromptConstant.ts +5 -4
- package/src/describe/image/structures/IAutoBeImageDescribeDraftApplication.ts +12 -63
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.ts +14 -52
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +23 -96
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.ts +12 -40
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.ts +30 -88
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.ts +35 -94
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.ts +23 -93
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.ts +15 -88
- package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.ts +92 -31
- package/src/orchestrate/common/structures/IAnalysisSectionEntry.ts +2 -8
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +8 -50
- package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +1 -9
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.ts +4 -23
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.ts +3 -21
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +4 -22
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +4 -22
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.ts +5 -17
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.ts +7 -76
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.ts +6 -89
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.ts +7 -93
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.ts +3 -22
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.ts +3 -22
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.ts +10 -97
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +14 -83
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.ts +12 -90
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +12 -80
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +21 -116
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.ts +24 -112
- package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +11 -83
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +11 -76
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.ts +18 -96
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.ts +11 -76
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.ts +25 -107
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +5 -31
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.ts +6 -42
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.ts +22 -99
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.ts +12 -109
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.ts +14 -100
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.ts +15 -108
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.ts +24 -106
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.ts +13 -76
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.ts +13 -111
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.ts +26 -97
- package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.ts +16 -93
- package/src/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.ts +21 -1
- package/src/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.ts +26 -4
- package/src/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.ts +125 -9
- package/src/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.ts +1 -0
- package/src/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.ts +210 -7
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +17 -71
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.ts +32 -92
- package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.ts +32 -114
- package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.ts +29 -106
- package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.ts +38 -131
- package/src/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.ts +16 -71
- package/src/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.ts +16 -73
- package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.ts +37 -155
- package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.ts +25 -88
- package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.ts +48 -181
- package/src/orchestrate/realize/utils/generateTS2339Hints.ts +39 -19
|
@@ -9,9 +9,6 @@ export interface IAutoBeDatabaseCorrectApplication {
|
|
|
9
9
|
/**
|
|
10
10
|
* Process schema correction task or preliminary data requests.
|
|
11
11
|
*
|
|
12
|
-
* Fixes validation errors in specific database models while preserving all
|
|
13
|
-
* business logic and model descriptions. Returns ONLY corrected models.
|
|
14
|
-
*
|
|
15
12
|
* @param props Request containing either preliminary data request or complete
|
|
16
13
|
* task
|
|
17
14
|
*/
|
|
@@ -22,35 +19,17 @@ export namespace IAutoBeDatabaseCorrectApplication {
|
|
|
22
19
|
/**
|
|
23
20
|
* Think before you act.
|
|
24
21
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* For preliminary requests (getAnalysisSections, getDatabaseSchemas, etc.):
|
|
29
|
-
*
|
|
30
|
-
* - What critical information is missing that you don't already have?
|
|
31
|
-
* - Why do you need it specifically right now?
|
|
32
|
-
* - Be brief - state the gap, don't list everything you have.
|
|
22
|
+
* For preliminary requests: what critical information is missing and why?
|
|
23
|
+
* Be brief — state the gap, don't list everything you have.
|
|
33
24
|
*
|
|
34
|
-
* For completion
|
|
35
|
-
*
|
|
36
|
-
* - What key assets did you acquire?
|
|
37
|
-
* - What did you accomplish?
|
|
38
|
-
* - Why is it sufficient to complete?
|
|
39
|
-
* - Summarize - don't enumerate every single item.
|
|
40
|
-
*
|
|
41
|
-
* This reflection helps you avoid duplicate requests and premature
|
|
42
|
-
* completion.
|
|
25
|
+
* For completion: what key assets did you acquire, what did you accomplish,
|
|
26
|
+
* why is it sufficient? Summarize — don't enumerate every single item.
|
|
43
27
|
*/
|
|
44
28
|
thinking: string;
|
|
45
29
|
|
|
46
30
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* Determines which action to perform: preliminary data retrieval
|
|
50
|
-
* (getAnalysisSections, getPreviousAnalysisSections, getDatabaseSchemas,
|
|
51
|
-
* getPreviousDatabaseSchemas) or final schema correction (complete). When
|
|
52
|
-
* preliminary returns empty array, that type is removed from the union,
|
|
53
|
-
* physically preventing repeated calls.
|
|
31
|
+
* Action to perform. Exhausted preliminary types are removed from the
|
|
32
|
+
* union, physically preventing repeated calls.
|
|
54
33
|
*/
|
|
55
34
|
request:
|
|
56
35
|
| IComplete
|
|
@@ -61,96 +40,35 @@ export namespace IAutoBeDatabaseCorrectApplication {
|
|
|
61
40
|
}
|
|
62
41
|
|
|
63
42
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* Executes targeted error correction to resolve specific validation issues in
|
|
67
|
-
* affected models only. Applies minimal changes while preserving original
|
|
68
|
-
* design intent and business logic.
|
|
43
|
+
* Fix validation errors in affected models only, preserving design intent and
|
|
44
|
+
* business logic.
|
|
69
45
|
*/
|
|
70
46
|
export interface IComplete {
|
|
71
|
-
/**
|
|
72
|
-
* Type discriminator for the request.
|
|
73
|
-
*
|
|
74
|
-
* Determines which action to perform: preliminary data retrieval or actual
|
|
75
|
-
* task execution. Value "complete" indicates this is the final task
|
|
76
|
-
* execution request.
|
|
77
|
-
*/
|
|
47
|
+
/** Type discriminator for completion request. */
|
|
78
48
|
type: "complete";
|
|
79
49
|
|
|
80
50
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* indexes)
|
|
94
|
-
* - Identify which models need correction vs. remain unchanged
|
|
95
|
-
* 2. Targeted fix strategy:
|
|
96
|
-
*
|
|
97
|
-
* - Focus ONLY on models mentioned in validation errors
|
|
98
|
-
* - Outline minimal changes needed for each affected model
|
|
99
|
-
* - Plan cross-model reference updates without modifying non-error models
|
|
100
|
-
* - Ensure unchanged models maintain valid references to corrected models
|
|
101
|
-
* 3. Model-specific fix plan:
|
|
102
|
-
*
|
|
103
|
-
* - Model-by-model modification plan for ONLY affected models
|
|
104
|
-
* - Exact field additions, renames, or type corrections required
|
|
105
|
-
* - Reference updates within corrected models only
|
|
106
|
-
* - Index corrections limited to affected models
|
|
107
|
-
* 4. Minimal scope validation:
|
|
108
|
-
*
|
|
109
|
-
* - Confirm which models will be included in output (error models only)
|
|
110
|
-
* - List models that will remain unchanged in original schema
|
|
111
|
-
* - Identify cross-model dependencies without including unchanged models
|
|
112
|
-
* - Preserve all business logic within corrected models
|
|
113
|
-
* 5. Targeted impact assessment:
|
|
114
|
-
*
|
|
115
|
-
* - Potential effects of fixes on unchanged models (reference validation)
|
|
116
|
-
* - Verification points for corrected models only
|
|
117
|
-
* - Ensure no new validation errors in targeted models
|
|
118
|
-
* - Confirm minimal output scope compliance
|
|
51
|
+
* Execution plan for fixing validation errors. Required steps:
|
|
52
|
+
*
|
|
53
|
+
* 1. Error scope analysis — list all validation errors, extract affected table
|
|
54
|
+
* names, categorize by type (duplications, references, types, indexes)
|
|
55
|
+
* 2. Targeted fix strategy — focus ONLY on models in errors, outline minimal
|
|
56
|
+
* changes per model
|
|
57
|
+
* 3. Model-specific fix plan — detail corrections per affected model
|
|
58
|
+
* 4. Minimal scope validation — confirm which models are in/out of output
|
|
59
|
+
* 5. Targeted impact assessment — verify fixes don't break references from
|
|
60
|
+
* unchanged models
|
|
61
|
+
*
|
|
62
|
+
* Preserve all business logic and cross-model references.
|
|
119
63
|
*/
|
|
120
64
|
planning: string;
|
|
121
65
|
|
|
122
66
|
/**
|
|
123
67
|
* Models with validation errors that need correction.
|
|
124
68
|
*
|
|
125
|
-
* Contains ONLY models
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* Expected validation issues:
|
|
130
|
-
*
|
|
131
|
-
* - Duplicate field/relation names within these specific models
|
|
132
|
-
* - Invalid foreign key references from these models to other models
|
|
133
|
-
* - Single foreign key fields in index arrays within these models
|
|
134
|
-
* - Invalid naming conventions within these specific models
|
|
135
|
-
* - Type validation errors in fields of these models
|
|
136
|
-
*
|
|
137
|
-
* Model content analysis:
|
|
138
|
-
*
|
|
139
|
-
* - Complete field definitions for each error model only
|
|
140
|
-
* - Relationships from these models (may reference unchanged models)
|
|
141
|
-
* - Indexes within these models that need correction
|
|
142
|
-
* - Business descriptions specific to these models
|
|
143
|
-
* - Cross-model references that need validation (read-only for targets)
|
|
144
|
-
*
|
|
145
|
-
* Processing notes:
|
|
146
|
-
*
|
|
147
|
-
* - Input contains ONLY models with validation errors
|
|
148
|
-
* - May reference other models not included in this input
|
|
149
|
-
* - Cross-model references must be validated but target models won't be
|
|
150
|
-
* modified
|
|
151
|
-
* - Output should return corrected versions of ONLY these input models
|
|
152
|
-
* - All business logic and descriptions within these models must be preserved
|
|
153
|
-
* - Corrections must not break references from unchanged models
|
|
69
|
+
* Contains ONLY models from IAutoBeDatabaseValidation.IError[]. Output
|
|
70
|
+
* corrected versions of these models only. Cross-model references must stay
|
|
71
|
+
* valid but target models are not modified.
|
|
154
72
|
*/
|
|
155
73
|
models: AutoBeDatabase.IModel[];
|
|
156
74
|
}
|
|
@@ -6,55 +6,21 @@ import { IAutoBePreliminaryGetPreviousAnalysisSections } from "../../common/stru
|
|
|
6
6
|
import { IAutoBePreliminaryGetPreviousDatabaseSchemas } from "../../common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas";
|
|
7
7
|
|
|
8
8
|
export interface IAutoBeDatabaseGroupApplication {
|
|
9
|
-
/**
|
|
10
|
-
* Process database component group generation task or preliminary data
|
|
11
|
-
* requests.
|
|
12
|
-
*
|
|
13
|
-
* Generate logical groups for organizing database component extraction based
|
|
14
|
-
* on business domains. Processes group generation with incremental context
|
|
15
|
-
* loading to ensure comprehensive organization.
|
|
16
|
-
*
|
|
17
|
-
* @param props Request containing either preliminary data request or complete
|
|
18
|
-
* task
|
|
19
|
-
*/
|
|
9
|
+
/** Process group generation task or retrieve preliminary data. */
|
|
20
10
|
process(props: IAutoBeDatabaseGroupApplication.IProps): void;
|
|
21
11
|
}
|
|
22
12
|
|
|
23
13
|
export namespace IAutoBeDatabaseGroupApplication {
|
|
24
14
|
export interface IProps {
|
|
25
15
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* Before requesting preliminary data or completing your task, reflect on
|
|
29
|
-
* your current state and explain your reasoning:
|
|
30
|
-
*
|
|
31
|
-
* For preliminary requests (getAnalysisSections,
|
|
32
|
-
* getPreviousAnalysisSections, getPreviousDatabaseSchemas):
|
|
33
|
-
*
|
|
34
|
-
* - What critical information is missing that you don't already have?
|
|
35
|
-
* - Why do you need it specifically right now?
|
|
36
|
-
* - Be brief - state the gap, don't list everything you have.
|
|
37
|
-
*
|
|
38
|
-
* For completion (complete):
|
|
39
|
-
*
|
|
40
|
-
* - What key assets did you acquire?
|
|
41
|
-
* - What did you accomplish?
|
|
42
|
-
* - Why is it sufficient to complete?
|
|
43
|
-
* - Summarize - don't enumerate every single item.
|
|
44
|
-
*
|
|
45
|
-
* This reflection helps you avoid duplicate requests and premature
|
|
46
|
-
* completion.
|
|
16
|
+
* Reasoning about your current state: what's missing (preliminary) or what
|
|
17
|
+
* you accomplished (completion).
|
|
47
18
|
*/
|
|
48
19
|
thinking: string;
|
|
49
20
|
|
|
50
21
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* Determines which action to perform: preliminary data retrieval
|
|
54
|
-
* (getAnalysisSections, getPreviousAnalysisSections,
|
|
55
|
-
* getPreviousDatabaseSchemas) or final group generation (complete). When
|
|
56
|
-
* preliminary returns empty array, that type is removed from the union,
|
|
57
|
-
* physically preventing repeated calls.
|
|
22
|
+
* Action to perform. Exhausted preliminary types are removed from the
|
|
23
|
+
* union.
|
|
58
24
|
*/
|
|
59
25
|
request:
|
|
60
26
|
| IComplete
|
|
@@ -63,54 +29,25 @@ export namespace IAutoBeDatabaseGroupApplication {
|
|
|
63
29
|
| IAutoBePreliminaryGetPreviousDatabaseSchemas;
|
|
64
30
|
}
|
|
65
31
|
|
|
66
|
-
/**
|
|
67
|
-
* Request to generate database component groups.
|
|
68
|
-
*
|
|
69
|
-
* Executes group generation to organize database components based on business
|
|
70
|
-
* domains from requirements.
|
|
71
|
-
*/
|
|
32
|
+
/** Generate database component groups organized by business domains. */
|
|
72
33
|
export interface IComplete {
|
|
73
|
-
/**
|
|
74
|
-
* Type discriminator for the request.
|
|
75
|
-
*
|
|
76
|
-
* Determines which action to perform: preliminary data retrieval or actual
|
|
77
|
-
* task execution. Value "complete" indicates this is the final task
|
|
78
|
-
* execution request.
|
|
79
|
-
*/
|
|
34
|
+
/** Type discriminator for completion request. */
|
|
80
35
|
type: "complete";
|
|
81
36
|
|
|
82
37
|
/**
|
|
83
|
-
* Analysis of the requirements structure
|
|
84
|
-
*
|
|
85
|
-
* Documents the agent's understanding of the business requirements:
|
|
86
|
-
*
|
|
87
|
-
* - What major business domains were identified from the requirements?
|
|
88
|
-
* - How are these domains related to each other?
|
|
89
|
-
* - What organizational patterns exist in the requirements?
|
|
90
|
-
* - What foundational vs domain-specific components are needed?
|
|
38
|
+
* Analysis of the requirements structure, domain organization, and
|
|
39
|
+
* component needs.
|
|
91
40
|
*/
|
|
92
41
|
analysis: string;
|
|
93
42
|
|
|
94
|
-
/**
|
|
95
|
-
* Rationale for the component grouping decisions.
|
|
96
|
-
*
|
|
97
|
-
* Explains why the groups were organized this way:
|
|
98
|
-
*
|
|
99
|
-
* - Why was each component group created?
|
|
100
|
-
* - Why were certain domains combined or kept separate?
|
|
101
|
-
* - How does the grouping reflect the business domain structure?
|
|
102
|
-
* - What considerations drove the component ordering?
|
|
103
|
-
*/
|
|
43
|
+
/** Rationale for component grouping decisions and domain boundaries. */
|
|
104
44
|
rationale: string;
|
|
105
45
|
|
|
106
46
|
/**
|
|
107
|
-
*
|
|
47
|
+
* Database component groups derived from business domains.
|
|
108
48
|
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* (Systematic, Actors) separately from domain-specific groups. DO: Organize
|
|
112
|
-
* groups around business workflows and entity relationships. DO: Provide
|
|
113
|
-
* complete coverage of all components without overlap.
|
|
49
|
+
* Separate foundational groups (Systematic, Actors) from domain-specific
|
|
50
|
+
* groups. Ensure complete coverage without overlap.
|
|
114
51
|
*/
|
|
115
52
|
groups: AutoBeDatabaseGroup[] & tags.MinItems<1>;
|
|
116
53
|
}
|
|
@@ -5,49 +5,21 @@ import { IAutoBePreliminaryGetPreviousAnalysisSections } from "../../common/stru
|
|
|
5
5
|
import { IAutoBePreliminaryGetPreviousDatabaseSchemas } from "../../common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas";
|
|
6
6
|
|
|
7
7
|
export interface IAutoBeDatabaseGroupReviewApplication {
|
|
8
|
-
/**
|
|
9
|
-
* Analyze requirements and review the component group skeletons.
|
|
10
|
-
*
|
|
11
|
-
* Your PRIMARY task is to verify that the group structure provides complete,
|
|
12
|
-
* well-organized coverage of all business domains described in the
|
|
13
|
-
* requirements. Review existing groups and identify necessary modifications
|
|
14
|
-
* using create, update, or erase operations.
|
|
15
|
-
*
|
|
16
|
-
* ALWAYS fetch analysis sections first using `getAnalysisSections` to
|
|
17
|
-
* understand what business domains exist, then systematically verify group
|
|
18
|
-
* coverage and apply corrections.
|
|
19
|
-
*
|
|
20
|
-
* @param props Request containing either preliminary data request or complete
|
|
21
|
-
* task with group revisions
|
|
22
|
-
*/
|
|
8
|
+
/** Process group review task or retrieve preliminary data. */
|
|
23
9
|
process(props: IAutoBeDatabaseGroupReviewApplication.IProps): void;
|
|
24
10
|
}
|
|
25
11
|
|
|
26
12
|
export namespace IAutoBeDatabaseGroupReviewApplication {
|
|
27
13
|
export interface IProps {
|
|
28
14
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* For preliminary requests (getAnalysisSections,
|
|
32
|
-
* getPreviousAnalysisSections, getPreviousDatabaseSchemas):
|
|
33
|
-
*
|
|
34
|
-
* - What business domains do you need to analyze?
|
|
35
|
-
* - What requirements will help verify group coverage?
|
|
36
|
-
*
|
|
37
|
-
* For completion (complete):
|
|
38
|
-
*
|
|
39
|
-
* - What domains did you analyze?
|
|
40
|
-
* - How many revisions are you making and why?
|
|
41
|
-
* - Summarize the domain-to-group mapping.
|
|
15
|
+
* Reasoning about your current state: what's missing (preliminary) or what
|
|
16
|
+
* you accomplished (completion).
|
|
42
17
|
*/
|
|
43
18
|
thinking: string;
|
|
44
19
|
|
|
45
20
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* Use preliminary requests (getAnalysisSections, etc.) to fetch
|
|
49
|
-
* requirements documents. Use complete to submit group revisions after
|
|
50
|
-
* thorough domain coverage analysis.
|
|
21
|
+
* Action to perform. Exhausted preliminary types are removed from the
|
|
22
|
+
* union.
|
|
51
23
|
*/
|
|
52
24
|
request:
|
|
53
25
|
| IComplete
|
|
@@ -62,92 +34,22 @@ export namespace IAutoBeDatabaseGroupReviewApplication {
|
|
|
62
34
|
type: "complete";
|
|
63
35
|
|
|
64
36
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* Document how you analyzed business requirements and mapped them to group
|
|
68
|
-
* modifications:
|
|
69
|
-
*
|
|
70
|
-
* - What business domains are defined in requirements?
|
|
71
|
-
* - Does each domain have a corresponding group?
|
|
72
|
-
* - Are group boundaries appropriate?
|
|
73
|
-
* - Are kind assignments correct?
|
|
74
|
-
*
|
|
75
|
-
* Be specific - reference actual requirements and explain the
|
|
76
|
-
* domain-to-revisions mapping.
|
|
37
|
+
* How business requirements map to proposed group modifications,
|
|
38
|
+
* identifying coverage gaps.
|
|
77
39
|
*/
|
|
78
40
|
review: string;
|
|
79
41
|
|
|
80
42
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* Include all create, update, and erase operations identified during
|
|
84
|
-
* review. Each operation must include a reason explaining why the change is
|
|
85
|
-
* necessary.
|
|
86
|
-
*
|
|
87
|
-
* ## Operation Types:
|
|
43
|
+
* Group revision operations (create/update/erase). Each must include a
|
|
44
|
+
* reason.
|
|
88
45
|
*
|
|
89
|
-
*
|
|
46
|
+
* Constraints:
|
|
90
47
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* ```typescript
|
|
94
|
-
* {
|
|
95
|
-
* "type": "create",
|
|
96
|
-
* "reason": "Notification functionality exists in requirements but has no group",
|
|
97
|
-
* "group": {
|
|
98
|
-
* "thinking": "...",
|
|
99
|
-
* "review": "...",
|
|
100
|
-
* "rationale": "...",
|
|
101
|
-
* "namespace": "Notifications",
|
|
102
|
-
* "filename": "schema-10-notifications.prisma",
|
|
103
|
-
* "kind": "domain"
|
|
104
|
-
* }
|
|
105
|
-
* }
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* ### Update - Modify existing groups
|
|
109
|
-
*
|
|
110
|
-
* Use when a group has property issues.
|
|
111
|
-
*
|
|
112
|
-
* ```typescript
|
|
113
|
-
* {
|
|
114
|
-
* "type": "update",
|
|
115
|
-
* "reason": "Namespace uses incorrect casing",
|
|
116
|
-
* "originalNamespace": "products_catalog",
|
|
117
|
-
* "group": {
|
|
118
|
-
* "thinking": "...",
|
|
119
|
-
* "review": "...",
|
|
120
|
-
* "rationale": "...",
|
|
121
|
-
* "namespace": "Products",
|
|
122
|
-
* "filename": "schema-03-products.prisma",
|
|
123
|
-
* "kind": "domain"
|
|
124
|
-
* }
|
|
125
|
-
* }
|
|
126
|
-
* ```
|
|
127
|
-
*
|
|
128
|
-
* ### Erase - Remove groups
|
|
129
|
-
*
|
|
130
|
-
* Use when a group is unnecessary.
|
|
131
|
-
*
|
|
132
|
-
* ```typescript
|
|
133
|
-
* {
|
|
134
|
-
* "type": "erase",
|
|
135
|
-
* "reason": "Group is redundant with existing Products group",
|
|
136
|
-
* "namespace": "Catalog"
|
|
137
|
-
* }
|
|
138
|
-
* ```
|
|
139
|
-
*
|
|
140
|
-
* ## Constraints:
|
|
141
|
-
*
|
|
142
|
-
* - After revisions: exactly 1 authorization group, ≥1 domain groups
|
|
143
|
-
* - Each operation must have a clear, requirement-based reason
|
|
48
|
+
* - After revisions: exactly 1 authorization group, at least 1 domain group
|
|
144
49
|
* - Empty array is valid if no modifications are needed
|
|
145
50
|
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* - Namespace: PascalCase (e.g., "Products", "Orders")
|
|
149
|
-
* - Filename: `schema-{number}-{domain}.prisma` format
|
|
150
|
-
* - Kind: "authorization" or "domain"
|
|
51
|
+
* Naming: namespace PascalCase, filename `schema-{number}-{domain}.prisma`,
|
|
52
|
+
* kind "authorization" or "domain".
|
|
151
53
|
*/
|
|
152
54
|
revises: AutoBeDatabaseGroupRevise[];
|
|
153
55
|
}
|
|
@@ -6,10 +6,7 @@ import { IAutoBePreliminaryGetPreviousDatabaseSchemas } from "../../common/struc
|
|
|
6
6
|
|
|
7
7
|
export interface IAutoBeDatabaseSchemaApplication {
|
|
8
8
|
/**
|
|
9
|
-
* Process schema generation task or preliminary data
|
|
10
|
-
*
|
|
11
|
-
* Generates database models for the target component following normalization
|
|
12
|
-
* principles and database design best practices.
|
|
9
|
+
* Process schema generation task or retrieve preliminary data.
|
|
13
10
|
*
|
|
14
11
|
* @param props Request containing either preliminary data request or complete
|
|
15
12
|
* task
|
|
@@ -21,35 +18,17 @@ export namespace IAutoBeDatabaseSchemaApplication {
|
|
|
21
18
|
/**
|
|
22
19
|
* Think before you act.
|
|
23
20
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* For preliminary requests (getAnalysisSections, getDatabaseSchemas, etc.):
|
|
28
|
-
*
|
|
29
|
-
* - What critical information is missing that you don't already have?
|
|
30
|
-
* - Why do you need it specifically right now?
|
|
31
|
-
* - Be brief - state the gap, don't list everything you have.
|
|
32
|
-
*
|
|
33
|
-
* For completion (complete):
|
|
34
|
-
*
|
|
35
|
-
* - What key assets did you acquire?
|
|
36
|
-
* - What did you accomplish?
|
|
37
|
-
* - Why is it sufficient to complete?
|
|
38
|
-
* - Summarize - don't enumerate every single item.
|
|
21
|
+
* For preliminary requests: what critical information is missing and why?
|
|
22
|
+
* Be brief — state the gap, don't list everything you have.
|
|
39
23
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
24
|
+
* For completion: what key assets did you acquire, what did you accomplish,
|
|
25
|
+
* why is it sufficient? Summarize — don't enumerate every single item.
|
|
42
26
|
*/
|
|
43
27
|
thinking: string;
|
|
44
28
|
|
|
45
29
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* Determines which action to perform: preliminary data retrieval
|
|
49
|
-
* (getAnalysisSections, getPreviousAnalysisSections,
|
|
50
|
-
* getPreviousDatabaseSchemas) or final schema generation (complete). When
|
|
51
|
-
* preliminary returns empty array, that type is removed from the union,
|
|
52
|
-
* physically preventing repeated calls.
|
|
30
|
+
* Action to perform. Exhausted preliminary types are removed from the
|
|
31
|
+
* union, physically preventing repeated calls.
|
|
53
32
|
*/
|
|
54
33
|
request:
|
|
55
34
|
| IComplete
|
|
@@ -59,85 +38,35 @@ export namespace IAutoBeDatabaseSchemaApplication {
|
|
|
59
38
|
}
|
|
60
39
|
|
|
61
40
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* Executes schema generation to create production-ready database models
|
|
65
|
-
* following normalization principles, relationship patterns, and indexing
|
|
66
|
-
* strategies.
|
|
41
|
+
* Generate production-ready database schema models with normalization and
|
|
42
|
+
* indexing.
|
|
67
43
|
*/
|
|
68
44
|
export interface IComplete {
|
|
69
|
-
/**
|
|
70
|
-
* Type discriminator for the request.
|
|
71
|
-
*
|
|
72
|
-
* Determines which action to perform: preliminary data retrieval or actual
|
|
73
|
-
* task execution. Value "complete" indicates this is the final task
|
|
74
|
-
* execution request.
|
|
75
|
-
*/
|
|
45
|
+
/** Type discriminator for completion request. */
|
|
76
46
|
type: "complete";
|
|
77
47
|
|
|
78
48
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* Contains the database architecture strategy for the target table and any
|
|
82
|
-
* child tables needed for First Normal Form (1NF) compliance, including
|
|
83
|
-
* structure, relationships, normalization approach, indexing strategies,
|
|
84
|
-
* and business requirement mapping. This planning phase defines the
|
|
85
|
-
* blueprint for the model implementations.
|
|
86
|
-
*
|
|
87
|
-
* Key planning aspects:
|
|
49
|
+
* Database design plan for the target table and any child tables (1NF
|
|
50
|
+
* decomposition).
|
|
88
51
|
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* - Child table naming: Must use singular form of targetTable as prefix
|
|
94
|
-
* (e.g., for "shopping_orders": "shopping_order_items")
|
|
95
|
-
* - Other tables: Identify existing tables from otherComponents for foreign
|
|
96
|
-
* key relationships — never recreate them
|
|
97
|
-
* - Normalization: Strict adherence to 1NF, 2NF, 3NF principles
|
|
98
|
-
* - Snapshot architecture: Design for historical data preservation
|
|
99
|
-
* - Junction tables: Plan M:N relationships with proper naming
|
|
100
|
-
* ({table1}_{table2})
|
|
101
|
-
* - Materialized views: Identify needs for mv_ prefixed denormalized tables
|
|
52
|
+
* Child table naming: singular form of targetTable as prefix (e.g.,
|
|
53
|
+
* "shopping_order_items"). Never recreate existing tables from
|
|
54
|
+
* otherComponents. Strict 1NF/2NF/3NF adherence. Junction tables:
|
|
55
|
+
* {table1}_{table2}. Materialized views: mv_ prefix.
|
|
102
56
|
*/
|
|
103
57
|
plan: string;
|
|
104
58
|
|
|
105
59
|
/**
|
|
106
|
-
* Schema definition
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* calls.
|
|
117
|
-
*
|
|
118
|
-
* Model implementation requirements:
|
|
119
|
-
*
|
|
120
|
-
* - Primary keys: Always UUID type with field name "id"
|
|
121
|
-
* - Foreign keys: Proper IRelation configurations for all relationships
|
|
122
|
-
* - Business fields: Only raw data fields - no calculated or derived values
|
|
123
|
-
* - Data types: Limited to uuid, string, int, double, datetime, boolean, uri
|
|
124
|
-
* - Relationships: Correct patterns for 1:1, 1:N, and M:N
|
|
125
|
-
* - Indexes:
|
|
126
|
-
*
|
|
127
|
-
* - UniqueIndexes: Business constraints and composite unique keys
|
|
128
|
-
* - PlainIndexes: Multi-column query optimization (never single FK)
|
|
129
|
-
* - GinIndexes: Full-text search on appropriate string fields
|
|
130
|
-
* - Materialized views: Tables prefixed with "mv_" have material flag set
|
|
131
|
-
* - Documentation: Comprehensive English descriptions with business context
|
|
132
|
-
*
|
|
133
|
-
* Quality standards:
|
|
134
|
-
*
|
|
135
|
-
* - Strict adherence to 3NF (Third Normal Form)
|
|
136
|
-
* - No denormalization except in materialized views (mv_ tables)
|
|
137
|
-
* - All foreign keys reference valid existing tables
|
|
138
|
-
* - Consistent created_at, updated_at, deleted_at patterns
|
|
139
|
-
* - Proper historical data preservation where needed
|
|
140
|
-
* - Optimized index strategy for expected query patterns
|
|
60
|
+
* Schema definition with exactly one
|
|
61
|
+
* {@link AutoBeDatabaseSchemaDefinition.model} (the target table).
|
|
62
|
+
* Additional child tables go in
|
|
63
|
+
* {@link AutoBeDatabaseSchemaDefinition.newDesigns} as name + description
|
|
64
|
+
* pairs.
|
|
65
|
+
*
|
|
66
|
+
* Key rules: UUID "id" primary keys, data types limited to
|
|
67
|
+
* uuid/string/int/double/ datetime/boolean/uri, no derived values, strict
|
|
68
|
+
* 3NF, mv_ prefix for materialized views, consistent
|
|
69
|
+
* created_at/updated_at/deleted_at, PlainIndexes never single FK.
|
|
141
70
|
*/
|
|
142
71
|
definition: AutoBeDatabaseSchemaDefinition;
|
|
143
72
|
}
|