@autobe/agent 0.30.4 → 0.30.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/lib/constants/AutoBeSystemPromptConstant.d.ts +5 -4
  2. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  3. package/lib/describe/image/orchestrateImageDescribeDraft.js +6 -6
  4. package/lib/describe/image/structures/IAutoBeImageDescribeDraftApplication.d.ts +12 -63
  5. package/lib/index.mjs +2918 -2842
  6. package/lib/index.mjs.map +1 -1
  7. package/lib/orchestrate/analyze/orchestrateAnalyzeExtractDecisions.js +8 -8
  8. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +36 -37
  9. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  10. package/lib/orchestrate/analyze/orchestrateAnalyzeScenarioReview.js +7 -7
  11. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js +55 -42
  12. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionCrossFileReview.js.map +1 -1
  13. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js +67 -54
  14. package/lib/orchestrate/analyze/orchestrateAnalyzeSectionReview.js.map +1 -1
  15. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js +24 -25
  16. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSection.js.map +1 -1
  17. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js +24 -25
  18. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteSectionPatch.js.map +1 -1
  19. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js +30 -31
  20. package/lib/orchestrate/analyze/orchestrateAnalyzeWriteUnit.js.map +1 -1
  21. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.d.ts +14 -52
  22. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +23 -96
  23. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.d.ts +12 -40
  24. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.d.ts +30 -88
  25. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.d.ts +35 -94
  26. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.d.ts +23 -93
  27. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.d.ts +15 -88
  28. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js +76 -31
  29. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -1
  30. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +7 -7
  31. package/lib/orchestrate/common/structures/IAnalysisSectionEntry.d.ts +2 -8
  32. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +8 -50
  33. package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +1 -9
  34. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.d.ts +4 -23
  35. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.d.ts +3 -21
  36. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +4 -22
  37. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +4 -22
  38. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.d.ts +5 -17
  39. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.d.ts +7 -76
  40. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.d.ts +6 -89
  41. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.d.ts +7 -93
  42. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.d.ts +3 -22
  43. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.d.ts +3 -22
  44. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js +114 -139
  45. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -1
  46. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +90 -91
  47. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -1
  48. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js +58 -59
  49. package/lib/orchestrate/interface/orchestrateInterfaceEndpointWrite.js.map +1 -1
  50. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +58 -59
  51. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -1
  52. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js +108 -132
  53. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -1
  54. package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js +72 -72
  55. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +76 -77
  56. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -1
  57. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js +130 -159
  58. package/lib/orchestrate/interface/orchestrateInterfaceSchemaCasting.js.map +1 -1
  59. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js +126 -155
  60. package/lib/orchestrate/interface/orchestrateInterfaceSchemaComplement.js.map +1 -1
  61. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js +114 -142
  62. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRefine.js.map +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +5 -5
  64. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +100 -129
  65. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  66. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js +120 -149
  67. package/lib/orchestrate/interface/orchestrateInterfaceSchemaWrite.js.map +1 -1
  68. package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.d.ts +10 -97
  69. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +14 -83
  70. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.d.ts +12 -90
  71. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +12 -80
  72. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +21 -116
  73. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.d.ts +24 -112
  74. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +11 -83
  75. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +11 -76
  76. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.d.ts +18 -96
  77. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.d.ts +11 -76
  78. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.d.ts +25 -107
  79. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +5 -31
  80. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.d.ts +6 -42
  81. package/lib/orchestrate/prisma/orchestratePrismaAuthorization.js +41 -41
  82. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js +62 -63
  83. package/lib/orchestrate/prisma/orchestratePrismaAuthorizationReview.js.map +1 -1
  84. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +40 -41
  85. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  86. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js +60 -61
  87. package/lib/orchestrate/prisma/orchestratePrismaComponentReview.js.map +1 -1
  88. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +112 -116
  89. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  90. package/lib/orchestrate/prisma/orchestratePrismaGroup.js +48 -49
  91. package/lib/orchestrate/prisma/orchestratePrismaGroup.js.map +1 -1
  92. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js +70 -71
  93. package/lib/orchestrate/prisma/orchestratePrismaGroupReview.js.map +1 -1
  94. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +118 -122
  95. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  96. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js +126 -131
  97. package/lib/orchestrate/prisma/orchestratePrismaSchemaReview.js.map +1 -1
  98. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.d.ts +22 -99
  99. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.d.ts +12 -109
  100. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.d.ts +14 -100
  101. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.d.ts +15 -108
  102. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.d.ts +24 -106
  103. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.d.ts +13 -76
  104. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.d.ts +13 -111
  105. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.d.ts +26 -97
  106. package/lib/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.d.ts +16 -93
  107. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js +1 -1
  108. package/lib/orchestrate/realize/histories/transformRealizeOperationCorrectHistory.js.map +1 -1
  109. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js +1 -1
  110. package/lib/orchestrate/realize/histories/transformRealizeOperationWriteHistory.js.map +1 -1
  111. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js +20 -2
  112. package/lib/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.js.map +1 -1
  113. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js +22 -2
  114. package/lib/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.js.map +1 -1
  115. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectCasting.js +7 -7
  116. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js +86 -6
  117. package/lib/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.js.map +1 -1
  118. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +38 -38
  119. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +34 -34
  120. package/lib/orchestrate/realize/orchestrateRealizeCollectorCorrectOverall.js +38 -38
  121. package/lib/orchestrate/realize/orchestrateRealizeCollectorPlan.js +54 -54
  122. package/lib/orchestrate/realize/orchestrateRealizeCollectorWrite.js +36 -36
  123. package/lib/orchestrate/realize/orchestrateRealizeOperationCorrectOverall.js +44 -44
  124. package/lib/orchestrate/realize/orchestrateRealizeOperationWrite.js +42 -42
  125. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js +1 -0
  126. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.js.map +1 -1
  127. package/lib/orchestrate/realize/orchestrateRealizeTransformerCorrectOverall.js +46 -46
  128. package/lib/orchestrate/realize/orchestrateRealizeTransformerPlan.js +36 -36
  129. package/lib/orchestrate/realize/orchestrateRealizeTransformerWrite.js +44 -44
  130. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.d.ts +18 -0
  131. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js +167 -8
  132. package/lib/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.js.map +1 -1
  133. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +17 -71
  134. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.d.ts +32 -92
  135. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.d.ts +32 -114
  136. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.d.ts +29 -106
  137. package/lib/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.d.ts +38 -131
  138. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.d.ts +16 -71
  139. package/lib/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.d.ts +16 -73
  140. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.d.ts +37 -155
  141. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.d.ts +25 -88
  142. package/lib/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.d.ts +48 -181
  143. package/lib/orchestrate/realize/utils/generateTS2339Hints.d.ts +5 -3
  144. package/lib/orchestrate/realize/utils/generateTS2339Hints.js +37 -19
  145. package/lib/orchestrate/realize/utils/generateTS2339Hints.js.map +1 -1
  146. package/lib/orchestrate/test/histories/transformTestOperationWriteHistory.js +2 -2
  147. package/lib/orchestrate/test/orchestrateTestScenario.js +22 -22
  148. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +22 -22
  149. package/package.json +5 -5
  150. package/src/constants/AutoBeSystemPromptConstant.ts +5 -4
  151. package/src/describe/image/structures/IAutoBeImageDescribeDraftApplication.ts +12 -63
  152. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeExtractDecisionsApplication.ts +14 -52
  153. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +23 -96
  154. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioReviewApplication.ts +12 -40
  155. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionCrossFileReviewApplication.ts +30 -88
  156. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeSectionReviewApplication.ts +35 -94
  157. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteSectionApplication.ts +23 -93
  158. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteUnitApplication.ts +15 -88
  159. package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.ts +92 -31
  160. package/src/orchestrate/common/structures/IAnalysisSectionEntry.ts +2 -8
  161. package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +8 -50
  162. package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +1 -9
  163. package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisSections.ts +4 -23
  164. package/src/orchestrate/common/structures/IAutoBePreliminaryGetDatabaseSchemas.ts +3 -21
  165. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +4 -22
  166. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +4 -22
  167. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousAnalysisSections.ts +5 -17
  168. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousDatabaseSchemas.ts +7 -76
  169. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.ts +6 -89
  170. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.ts +7 -93
  171. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeCollectors.ts +3 -22
  172. package/src/orchestrate/common/structures/IAutoBePreliminaryGetRealizeTransformers.ts +3 -22
  173. package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationApplication.ts +10 -97
  174. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +14 -83
  175. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointWriteApplication.ts +12 -90
  176. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +12 -80
  177. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +21 -116
  178. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.ts +24 -112
  179. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +11 -83
  180. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +11 -76
  181. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaCastingApplication.ts +18 -96
  182. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaComplementApplication.ts +11 -76
  183. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRefineApplication.ts +25 -107
  184. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +5 -31
  185. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaReviewApplication.ts +6 -42
  186. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationApplication.ts +22 -99
  187. package/src/orchestrate/prisma/structures/IAutoBeDatabaseAuthorizationReviewApplication.ts +12 -109
  188. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentApplication.ts +14 -100
  189. package/src/orchestrate/prisma/structures/IAutoBeDatabaseComponentReviewApplication.ts +15 -108
  190. package/src/orchestrate/prisma/structures/IAutoBeDatabaseCorrectApplication.ts +24 -106
  191. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupApplication.ts +13 -76
  192. package/src/orchestrate/prisma/structures/IAutoBeDatabaseGroupReviewApplication.ts +13 -111
  193. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaApplication.ts +26 -97
  194. package/src/orchestrate/prisma/structures/IAutoBeDatabaseSchemaReviewApplication.ts +16 -93
  195. package/src/orchestrate/realize/histories/transformRealizeTransformerCorrectHistory.ts +21 -1
  196. package/src/orchestrate/realize/histories/transformRealizeTransformerWriteHistory.ts +26 -4
  197. package/src/orchestrate/realize/internal/orchestrateRealizeCorrectOverall.ts +125 -9
  198. package/src/orchestrate/realize/orchestrateRealizeTransformerCorrectCasting.ts +1 -0
  199. package/src/orchestrate/realize/programmers/AutoBeRealizeTransformerProgrammer.ts +210 -7
  200. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +17 -71
  201. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.ts +32 -92
  202. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorCorrectApplication.ts +32 -114
  203. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorPlanApplication.ts +29 -106
  204. package/src/orchestrate/realize/structures/IAutoBeRealizeCollectorWriteApplication.ts +38 -131
  205. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationCorrectApplication.ts +16 -71
  206. package/src/orchestrate/realize/structures/IAutoBeRealizeOperationWriteApplication.ts +16 -73
  207. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerCorrectApplication.ts +37 -155
  208. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerPlanApplication.ts +25 -88
  209. package/src/orchestrate/realize/structures/IAutoBeRealizeTransformerWriteApplication.ts +48 -181
  210. package/src/orchestrate/realize/utils/generateTS2339Hints.ts +39 -19
@@ -1,66 +1,33 @@
1
1
  import { IAutoBePreliminaryGetPreviousAnalysisSections } from "../../common/structures/IAutoBePreliminaryGetPreviousAnalysisSections";
2
2
 
3
3
  /**
4
- * Application interface for the Cross-File Section Review agent.
5
- *
6
- * This agent reviews ALL files' section content together in a single LLM call,
7
- * providing cross-file validation for value consistency, terminology, Mermaid
8
- * diagram style, and EARS format (03-functional-requirements, 04-business-rules
9
- * only).
4
+ * Reviews all files' section content for cross-file value consistency,
5
+ * terminology, Mermaid style, and EARS format.
10
6
  */
11
7
  export interface IAutoBeAnalyzeSectionReviewApplication {
12
- /**
13
- * Process cross-file section review task or preliminary data requests.
14
- *
15
- * Reviews and validates section content across ALL files in a single call,
16
- * ensuring cross-file consistency and uniformity.
17
- *
18
- * @param props Request containing either preliminary data request or complete
19
- * task
20
- */
8
+ /** Review section content across all files for cross-file consistency. */
21
9
  process(props: IAutoBeAnalyzeSectionReviewApplicationProps): void;
22
10
  }
23
11
 
24
12
  export interface IAutoBeAnalyzeSectionReviewApplicationProps {
25
13
  /**
26
- * Think before you act.
27
- *
28
- * Before requesting preliminary data or completing your task, reflect on your
29
- * current state and explain your reasoning:
30
- *
31
- * For preliminary requests:
32
- *
33
- * - What additional context do you need for cross-file validation?
34
- *
35
- * For completion:
36
- *
37
- * - Is EARS format consistent across requirement files (03, 04)?
38
- * - Are values and constraints consistent across all files?
39
- * - Is terminology aligned across all files?
40
- * - Are Mermaid diagram styles uniform?
14
+ * Reasoning about your current state: what's missing (preliminary) or what
15
+ * you accomplished (completion).
41
16
  */
42
17
  thinking?: string | null;
43
18
 
44
- /** Type discriminator for the request. */
19
+ /** Action to perform. Exhausted preliminary types are removed from the union. */
45
20
  request:
46
21
  | IAutoBeAnalyzeSectionReviewApplicationComplete
47
22
  | IAutoBePreliminaryGetPreviousAnalysisSections;
48
23
  }
49
24
 
50
- /**
51
- * Request to complete the cross-file section review.
52
- *
53
- * Provides per-file review verdicts for all files' section content.
54
- */
25
+ /** Complete the cross-file section review with per-file verdicts. */
55
26
  export interface IAutoBeAnalyzeSectionReviewApplicationComplete {
56
- /** Type discriminator for the request. */
27
+ /** Type discriminator for completion request. */
57
28
  type: "complete";
58
29
 
59
- /**
60
- * Per-file review results.
61
- *
62
- * Each entry contains the verdict for one file's section content.
63
- */
30
+ /** Per-file review results. */
64
31
  fileResults: IAutoBeAnalyzeSectionReviewApplicationFileResult[];
65
32
  }
66
33
 
@@ -69,56 +36,29 @@ export interface IAutoBeAnalyzeSectionReviewApplicationFileResult {
69
36
  /** Index of the file in the scenario's files array. */
70
37
  fileIndex: number;
71
38
 
72
- /**
73
- * Whether this file's section content passed review.
74
- *
75
- * If true: File's sections are consistent with other files. If false: File's
76
- * sections must be regenerated with feedback.
77
- */
39
+ /** Whether this file's section content passed review. */
78
40
  approved: boolean;
79
41
 
80
42
  /**
81
- * Detailed review feedback for this file's section content.
82
- *
83
- * Cross-file review criteria evaluated:
84
- *
85
- * - EARS format compliance (03-functional-requirements, 04-business-rules only)
86
- * - Value and constraint consistency
87
- * - Terminology alignment
88
- * - Mermaid diagram style uniformity
89
- * - No prohibited content
90
- *
91
- * For rejected files:
92
- *
93
- * - Specific inconsistencies identified
94
- * - Recommendations for alignment
43
+ * Cross-file review feedback. For rejected files, describe specific
44
+ * inconsistencies.
95
45
  */
96
46
  feedback: string;
97
47
 
98
48
  /**
99
- * Structured review issues for targeted rewrites / patches.
100
- *
101
- * Optional for backward compatibility.
49
+ * Structured review issues for targeted rewrites. Optional for backward
50
+ * compatibility.
102
51
  */
103
52
  issues?: IAutoBeAnalyzeSectionReviewApplicationReviewIssue[] | null;
104
53
 
105
- /**
106
- * Revised sections for this file if modifications were made.
107
- *
108
- * Organized by moduleIndex and unitIndex. Set to `null` if no revisions were
109
- * made.
110
- */
54
+ /** Revised sections organized by moduleIndex/unitIndex. Null if no revisions. */
111
55
  revisedSections:
112
56
  | IAutoBeAnalyzeSectionReviewApplicationRevisedModuleSections[]
113
57
  | null;
114
58
 
115
59
  /**
116
- * Specific module/unit pairs whose sections were rejected.
117
- *
118
- * When rejecting a file, identify EXACTLY which modules and units have
119
- * problematic sections. Only these will be regenerated on retry.
120
- *
121
- * Set to null if all module/units need regeneration, or if approving.
60
+ * Module/unit pairs with rejected sections. Only these are regenerated on
61
+ * retry. Null if all module/units need regeneration, or if approving.
122
62
  */
123
63
  rejectedModuleUnits:
124
64
  | IAutoBeAnalyzeSectionReviewApplicationRejectedModuleUnit[]
@@ -130,59 +70,60 @@ export interface IAutoBeAnalyzeSectionReviewApplicationRejectedModuleUnit {
130
70
  /** Index of the module section. */
131
71
  moduleIndex: number;
132
72
 
133
- /** Indices of units within this module that need section regeneration. */
73
+ /** Unit indices needing section regeneration. */
134
74
  unitIndices: number[];
135
75
 
136
- /** Specific feedback for this module/unit group's issues. */
76
+ /** Feedback for this module/unit group's issues. */
137
77
  feedback: string;
138
78
 
139
79
  /**
140
- * Structured issues scoped to this module/unit group.
141
- *
142
- * Optional for backward compatibility.
80
+ * Structured issues scoped to this module/unit group. Optional for backward
81
+ * compatibility.
143
82
  */
144
83
  issues?: IAutoBeAnalyzeSectionReviewApplicationReviewIssue[] | null;
145
84
 
146
85
  /**
147
- * Per-unit mapping of specific section indices that need regeneration.
148
- *
149
- * Keys are unit indices (from `unitIndices`), values are arrays of section
150
- * indices within that unit's `sectionSections[]` that failed review.
151
- *
152
- * When null/undefined or when a unitIndex is not present as a key, ALL
153
- * sections for that unit are regenerated (backward-compatible fallback).
86
+ * Per-unit mapping of section indices needing regeneration. When null or a
87
+ * unitIndex is absent, ALL sections for that unit are regenerated.
154
88
  */
155
89
  sectionIndicesPerUnit?: Record<number, number[]> | null;
156
90
  }
157
91
 
92
+ /** A specific review issue found during section content review. */
158
93
  export interface IAutoBeAnalyzeSectionReviewApplicationReviewIssue {
94
+ /** Rule violation code (e.g., "TERM-001", "VALUE-002"). */
159
95
  ruleCode: string;
96
+ /** Module index where the issue was found, or null if file-level. */
160
97
  moduleIndex: number | null;
98
+ /** Unit index where the issue was found, or null if module-level. */
161
99
  unitIndex: number | null;
100
+ /** Section index where the issue was found, or null if unit-level. */
162
101
  sectionIndex?: number | null;
102
+ /** Specific instruction for fixing this issue. */
163
103
  fixInstruction: string;
104
+ /** Supporting evidence from the source text. */
164
105
  evidence?: string | null;
165
106
  }
166
107
 
167
- /** Structure for revised sections of a single module. */
108
+ /** Revised sections of a single module. */
168
109
  export interface IAutoBeAnalyzeSectionReviewApplicationRevisedModuleSections {
169
110
  /** Index of the module section. */
170
111
  moduleIndex: number;
171
112
 
172
- /** Revised sections for each unit in this module. */
113
+ /** Revised sections for each unit. */
173
114
  units: IAutoBeAnalyzeSectionReviewApplicationRevisedUnitSections[];
174
115
  }
175
116
 
176
- /** Structure for revised sections of a single unit. */
117
+ /** Revised sections of a single unit. */
177
118
  export interface IAutoBeAnalyzeSectionReviewApplicationRevisedUnitSections {
178
119
  /** Index of the unit section. */
179
120
  unitIndex: number;
180
121
 
181
- /** Revised section sections for this unit. */
122
+ /** Revised subsections (#### level) within this unit. */
182
123
  sectionSections: IAutoBeAnalyzeSectionReviewApplicationRevisedSectionSection[];
183
124
  }
184
125
 
185
- /** Structure for a revised section. */
126
+ /** A revised section. */
186
127
  export interface IAutoBeAnalyzeSectionReviewApplicationRevisedSectionSection {
187
128
  /** Title of the section. */
188
129
  title: string;
@@ -1,61 +1,33 @@
1
1
  import { IAutoBePreliminaryGetPreviousAnalysisSections } from "../../common/structures/IAutoBePreliminaryGetPreviousAnalysisSections";
2
2
 
3
3
  /**
4
- * Application interface for the Section (###) generation agent.
5
- *
6
- * This agent is responsible for creating detailed sections within an approved
7
- * unit section structure, producing implementation-ready requirement
8
- * specifications.
4
+ * Generates detailed sections (###) within approved unit structures as
5
+ * implementation-ready specs.
9
6
  */
10
7
  export interface IAutoBeAnalyzeWriteSectionApplication {
11
8
  /**
12
- * Process section generation task or preliminary data requests.
13
- *
14
- * Creates detailed sections for a specific unit section, including complete
15
- * content with Mermaid diagrams and, for requirement-heavy files
16
- * (03-functional-requirements, 04-business-rules), EARS format requirements.
17
- *
18
- * @param props Request containing either preliminary data request or complete
19
- * task
9
+ * Create detailed sections for a unit, with Mermaid diagrams and EARS format
10
+ * where applicable.
20
11
  */
21
12
  process(props: IAutoBeAnalyzeWriteSectionApplicationProps): void;
22
13
  }
23
14
 
24
15
  export interface IAutoBeAnalyzeWriteSectionApplicationProps {
25
16
  /**
26
- * Think before you act.
27
- *
28
- * Before requesting preliminary data or completing your task, reflect on your
29
- * current state and explain your reasoning:
30
- *
31
- * For preliminary requests:
32
- *
33
- * - What additional context do you need for detailed content?
34
- *
35
- * For completion:
36
- *
37
- * - How do the sections address the keywords from the unit section?
38
- * - For 03/04 files: Are requirements specific and in EARS format?
39
- * - For other files: Is content written in clear, descriptive prose?
40
- * - Are Mermaid diagrams properly formatted?
17
+ * Reasoning about your current state: what's missing (preliminary) or what
18
+ * you accomplished (completion).
41
19
  */
42
20
  thinking?: string | null;
43
21
 
44
- /** Type discriminator for the request. */
22
+ /** Action to perform. Exhausted preliminary types are removed from the union. */
45
23
  request:
46
24
  | IAutoBeAnalyzeWriteSectionApplicationComplete
47
25
  | IAutoBePreliminaryGetPreviousAnalysisSections;
48
26
  }
49
27
 
50
- /**
51
- * Request to generate section content.
52
- *
53
- * Creates the detailed content within a unit section, including
54
- * implementation-ready requirements specifications with proper formatting and
55
- * diagrams.
56
- */
28
+ /** Generate detailed section content within a unit section. */
57
29
  export interface IAutoBeAnalyzeWriteSectionApplicationComplete {
58
- /** Type discriminator for the request. */
30
+ /** Type discriminator for completion request. */
59
31
  type: "complete";
60
32
 
61
33
  /** Index of the grandparent module section. */
@@ -64,39 +36,19 @@ export interface IAutoBeAnalyzeWriteSectionApplicationComplete {
64
36
  /** Index of the parent unit section. */
65
37
  unitIndex: number;
66
38
 
67
- /**
68
- * Array of sections for this unit section.
69
- *
70
- * Each section represents a detailed subsection (#### level) containing
71
- * specific requirements, specifications, or process descriptions. The content
72
- * should:
73
- *
74
- * - Use EARS format for requirements in 03-functional-requirements and
75
- * 04-business-rules files; use natural language prose for other files
76
- * - Include Mermaid diagrams with proper syntax
77
- * - Be specific and implementation-ready
78
- * - Avoid prohibited content (DB schemas, API specs)
79
- */
39
+ /** Detailed subsections (#### level) for this unit. */
80
40
  sectionSections: IAutoBeAnalyzeWriteSectionApplicationSectionSection[];
81
41
  }
82
42
 
83
- /** Structure representing a single section. */
43
+ /** A single section (#### level). */
84
44
  export interface IAutoBeAnalyzeWriteSectionApplicationSectionSection {
85
- /**
86
- * Title of the section (#### level heading).
87
- *
88
- * Should clearly indicate the specific requirement, process, or feature being
89
- * detailed.
90
- */
45
+ /** Section title (#### level heading). */
91
46
  title: string;
92
47
 
93
48
  /**
94
- * Complete content for the section.
95
- *
96
- * Contains detailed requirements, specifications, and diagrams. Content
97
- * guidelines:
49
+ * Complete section content with requirements, specs, and diagrams.
98
50
  *
99
- * EARS Format (ONLY for 03-functional-requirements, 04-business-rules):
51
+ * EARS Format (03-functional-requirements, 04-business-rules ONLY):
100
52
  *
101
53
  * - Ubiquitous: "THE <system> SHALL <function>"
102
54
  * - Event-driven: "WHEN <trigger>, THE <system> SHALL <function>"
@@ -104,39 +56,17 @@ export interface IAutoBeAnalyzeWriteSectionApplicationSectionSection {
104
56
  * - Unwanted: "IF <condition>, THEN THE <system> SHALL <function>"
105
57
  * - Optional: "WHERE <feature>, THE <system> SHALL <function>"
106
58
  *
107
- * Natural Language (for 00-toc, 01-actors-and-auth, 02-domain-model,
108
- * 05-non-functional):
109
- *
110
- * - Use clear, descriptive prose for definitions, concepts, and policies
111
- * - Focus on readability over formal structure
112
- * - Tables and bullet points are preferred for structured data
113
- *
114
- * Mermaid Diagram Rules:
115
- *
116
- * - ALL labels must use double quotes: A["User Login"]
117
- * - NO spaces between brackets and quotes
118
- * - Arrow syntax: --> (NOT --|)
119
- * - LR orientation preferred for flowcharts
120
- *
121
- * Prohibited Content:
122
- *
123
- * - Database schemas or ERD
124
- * - API endpoint specifications
125
- * - Technical implementation details
126
- * - Frontend UI/UX specifications
127
- *
128
- * Hallucination Prevention:
129
- *
130
- * - Every requirement must trace to the original user input
131
- * - Do NOT invent SLA numbers, timeout values, or performance targets
132
- * - Do NOT add security mechanisms (2FA, JWT, encryption) user did not mention
133
- * - Do NOT add infrastructure requirements (CDN, caching) user did not mention
134
- * - 05-non-functional: only describe aspects the user explicitly mentioned
59
+ * Other files (00-toc, 01, 02, 05): clear descriptive prose, tables, bullet
60
+ * points.
135
61
  *
136
- * Conciseness:
62
+ * Mermaid rules: ALL labels use double quotes A["Label"], no spaces before
63
+ * quotes, --> arrows, LR preferred.
137
64
  *
138
- * - One concept = one section, not multiple sections rephrasing the same idea
139
- * - 02-domain-model: max 1-3 sections per business concept
65
+ * NEVER include: DB schemas/ERD, API specs, implementation details, frontend
66
+ * UI/UX specs. Every requirement MUST trace to user input. Do NOT invent SLA
67
+ * numbers, timeouts, security mechanisms, or infrastructure the user did not
68
+ * mention. One concept = one section. 02-domain-model: max 1-3 sections per
69
+ * concept.
140
70
  */
141
71
  content: string;
142
72
  }
@@ -1,123 +1,50 @@
1
1
  import { IAutoBePreliminaryGetPreviousAnalysisSections } from "../../common/structures/IAutoBePreliminaryGetPreviousAnalysisSections";
2
2
 
3
- /**
4
- * Application interface for the Unit Section (##) generation agent.
5
- *
6
- * This agent is responsible for creating unit-level sections within an approved
7
- * module section structure, defining functional requirement groupings and their
8
- * content.
9
- */
3
+ /** Generates unit-level sections (##) within approved module structures. */
10
4
  export interface IAutoBeAnalyzeWriteUnitApplication {
11
5
  /**
12
- * Process unit section generation task or preliminary data requests.
13
- *
14
- * Creates unit-level sections for a specific module section, including
15
- * section titles, purposes, content, and keywords for guiding section
16
- * generation.
17
- *
18
- * @param props Request containing either preliminary data request or complete
19
- * task
6
+ * Create unit sections with titles, purposes, content, and keywords for a
7
+ * module.
20
8
  */
21
9
  process(props: IAutoBeAnalyzeWriteUnitApplicationProps): void;
22
10
  }
23
11
 
24
12
  export interface IAutoBeAnalyzeWriteUnitApplicationProps {
25
13
  /**
26
- * Think before you act.
27
- *
28
- * Before requesting preliminary data or completing your task, reflect on your
29
- * current state and explain your reasoning:
30
- *
31
- * For preliminary requests:
32
- *
33
- * - What additional context do you need for this module section?
34
- * - Why is this information necessary?
35
- *
36
- * For completion:
37
- *
38
- * - How do the unit sections align with the parent module section?
39
- * - What functional areas are covered?
40
- * - Are the keywords appropriate for guiding section generation?
14
+ * Reasoning about your current state: what's missing (preliminary) or what
15
+ * you accomplished (completion).
41
16
  */
42
17
  thinking?: string | null;
43
18
 
44
- /** Type discriminator for the request. */
19
+ /** Action to perform. Exhausted preliminary types are removed from the union. */
45
20
  request:
46
21
  | IAutoBeAnalyzeWriteUnitApplicationComplete
47
22
  | IAutoBePreliminaryGetPreviousAnalysisSections;
48
23
  }
49
24
 
50
- /**
51
- * Request to generate unit section structure.
52
- *
53
- * Creates the unit-level hierarchy within a module section, including section
54
- * definitions with purposes, content, and keywords that will guide section
55
- * generation.
56
- */
25
+ /** Generate unit section structure within a module section. */
57
26
  export interface IAutoBeAnalyzeWriteUnitApplicationComplete {
58
- /** Type discriminator for the request. */
27
+ /** Type discriminator for completion request. */
59
28
  type: "complete";
60
29
 
61
- /**
62
- * Index of the parent module section.
63
- *
64
- * References which module section (0-based) these unit sections belong to.
65
- * This ensures proper alignment with the approved module structure.
66
- */
30
+ /** Index of the parent module section (0-based). */
67
31
  moduleIndex: number;
68
32
 
69
- /**
70
- * Array of unit sections for this module section.
71
- *
72
- * Each unit section represents a subsection (### level) that groups related
73
- * functionality or requirements. The sections should:
74
- *
75
- * - Align with the parent module section's purpose
76
- * - Have clear functional boundaries
77
- * - Provide meaningful keywords for section guidance
78
- */
33
+ /** Unit sections (### level) grouping related functionality. */
79
34
  unitSections: IAutoBeAnalyzeWriteUnitApplicationUnitSection[];
80
35
  }
81
36
 
82
- /** Structure representing a single unit section. */
37
+ /** A single unit section. */
83
38
  export interface IAutoBeAnalyzeWriteUnitApplicationUnitSection {
84
- /**
85
- * Title of the unit section (### level heading).
86
- *
87
- * Should clearly indicate the functional area or requirement group covered by
88
- * this section.
89
- */
39
+ /** Title of the unit section (### level heading). */
90
40
  title: string;
91
41
 
92
- /**
93
- * Purpose statement explaining what this section covers.
94
- *
95
- * A brief description of the section's role within the parent module section
96
- * and what requirements it addresses.
97
- */
42
+ /** Brief purpose statement for this section's role within the parent module. */
98
43
  purpose: string;
99
44
 
100
- /**
101
- * Content for the unit section.
102
- *
103
- * The main body content that appears after the section heading, before any
104
- * sections. Should provide:
105
- *
106
- * - Overview of the functional area
107
- * - Context for the detailed requirements
108
- * - Relationships to other sections
109
- */
45
+ /** Main body content: overview, context, and relationships to other sections. */
110
46
  content: string;
111
47
 
112
- /**
113
- * Keywords that hint at section topics.
114
- *
115
- * A list of key concepts, features, or requirements that should be detailed
116
- * in the sections. These keywords guide the Section Agent in generating
117
- * appropriate detailed content.
118
- *
119
- * Example for "User Authentication" unit section: ["login", "registration",
120
- * "password recovery", "session management"]
121
- */
48
+ /** Keywords hinting at section topics to guide Section Agent generation. */
122
49
  keywords: string[];
123
50
  }
@@ -12,9 +12,12 @@ export const transformPreviousAndLatestCorrectHistory = (
12
12
  diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[];
13
13
  }>,
14
14
  ): IAgenticaHistoryJson.IAssistantMessage[] => {
15
- // console.log(printErrorHints(array.at(-1)!.script, array.at(-1)!.diagnostics));
16
- return array.map((failure, i) => {
17
- const isLatest = i === array.length - 1;
15
+ // P2-3: Summarize older failures when there are 3+ attempts
16
+ // Keep last 2 in full, summarize the rest
17
+ const summarized = summarizeOlderFailures(array);
18
+
19
+ return summarized.map((failure, i) => {
20
+ const isLatest = i === summarized.length - 1;
18
21
  const ts2339Hints = isLatest
19
22
  ? generateTS2339Hints(failure.diagnostics)
20
23
  : "";
@@ -26,52 +29,110 @@ export const transformPreviousAndLatestCorrectHistory = (
26
29
  ${
27
30
  isLatest
28
31
  ? "# Latest Failure"
29
- : StringUtil.trim`
30
- # Previous Failure
32
+ : failure.script === ""
33
+ ? StringUtil.trim`
34
+ # Summary of Earlier Failures
31
35
 
32
- This is the previous failure for your reference.
36
+ ${failure.diagnostics[0]?.messageText ?? "Multiple earlier correction attempts failed."}
33
37
 
34
- Never try to fix this previous failure code, but only
35
- focus on the latest failure below. This is provided just
36
- to give you context about your past mistakes.
38
+ Focus on the latest failure below and try a DIFFERENT approach.
39
+ `
40
+ : StringUtil.trim`
41
+ # Previous Failure
37
42
 
38
- If same mistake happens again, you must try to not
39
- repeat the same mistake. Change your approach to fix
40
- the issue.
41
- `
43
+ This is the previous failure for your reference.
44
+
45
+ Never try to fix this previous failure code, but only
46
+ focus on the latest failure below. This is provided just
47
+ to give you context about your past mistakes.
48
+
49
+ If same mistake happens again, you must try to not
50
+ repeat the same mistake. Change your approach to fix
51
+ the issue.
52
+ `
42
53
  }
43
54
 
44
- ## Original Code
55
+ ${
56
+ failure.script !== ""
57
+ ? StringUtil.trim`
58
+ ## Original Code
45
59
 
46
- Here is the previous code you have to review and fix.
60
+ Here is the previous code you have to review and fix.
47
61
 
48
- \`\`\`typescript
49
- ${failure.script}
50
- \`\`\`
62
+ \`\`\`typescript
63
+ ${failure.script}
64
+ \`\`\`
51
65
 
52
- ## Compilation Errors
66
+ ## Compilation Errors
53
67
 
54
- Here are the compilation errors found in the code above.
68
+ Here are the compilation errors found in the code above.
55
69
 
56
- \`\`\`json
57
- ${JSON.stringify(failure.diagnostics)}
58
- \`\`\`
70
+ \`\`\`json
71
+ ${JSON.stringify(failure.diagnostics)}
72
+ \`\`\`
59
73
 
60
- ## Error Annotated Code
74
+ ## Error Annotated Code
61
75
 
62
- Here is the error annotated code.
76
+ Here is the error annotated code.
63
77
 
64
- Please refer to the annotation for the location of the error.
78
+ Please refer to the annotation for the location of the error.
65
79
 
66
- By the way, note that, this code is only for reference purpose.
67
- Never fix code from this error annotated code. You must fix
68
- the original code above.
80
+ By the way, note that, this code is only for reference purpose.
81
+ Never fix code from this error annotated code. You must fix
82
+ the original code above.
69
83
 
70
- ${printErrorHints(failure.script, failure.diagnostics)}
84
+ ${printErrorHints(failure.script, failure.diagnostics)}
71
85
 
72
- ${ts2339Hints}
86
+ ${ts2339Hints}
87
+ `
88
+ : ""
89
+ }
73
90
  `,
74
91
  created_at: new Date().toISOString(),
75
92
  };
76
93
  });
77
94
  };
95
+
96
+ /**
97
+ * P2-3: When there are 3+ failure attempts, summarize the older ones to prevent
98
+ * context bloat. Keep the last 2 in full, collapse the rest into a single
99
+ * summary entry.
100
+ */
101
+ const summarizeOlderFailures = (
102
+ array: Array<{
103
+ script: string;
104
+ diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[];
105
+ }>,
106
+ ): Array<{
107
+ script: string;
108
+ diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[];
109
+ }> => {
110
+ if (array.length <= 2) return array;
111
+
112
+ const olderCount = array.length - 2;
113
+ const olderDiagCount = array
114
+ .slice(0, -2)
115
+ .reduce((sum, f) => sum + f.diagnostics.length, 0);
116
+
117
+ const summary: {
118
+ script: string;
119
+ diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[];
120
+ } = {
121
+ script: "",
122
+ diagnostics: [
123
+ {
124
+ file: array[0]!.diagnostics[0]?.file ?? null,
125
+ start: null,
126
+ length: null,
127
+ code: 0,
128
+ messageText:
129
+ `[Summary of ${olderCount} previous correction attempts with ` +
130
+ `${olderDiagCount} total errors. The same fixes were attempted but ` +
131
+ `failed. Focus on the latest diagnostics below and try a DIFFERENT approach.]`,
132
+ category: "error",
133
+ },
134
+ ],
135
+ };
136
+
137
+ return [summary, ...array.slice(-2)];
138
+ };