@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
@@ -6,10 +6,6 @@ export interface IAutoBeRealizeCollectorCorrectApplication {
6
6
  /**
7
7
  * Process collector correction task or preliminary data requests.
8
8
  *
9
- * Systematically analyzes and corrects TypeScript compilation errors in
10
- * collector functions through three-phase workflow (think → draft → revise).
11
- * Maintains business logic integrity while resolving all compilation issues.
12
- *
13
9
  * @param props Request containing either preliminary data request or complete
14
10
  * task
15
11
  */
@@ -21,66 +17,34 @@ export namespace IAutoBeRealizeCollectorCorrectApplication {
21
17
  /**
22
18
  * Think before you act.
23
19
  *
24
- * Before requesting preliminary data or completing your task, reflect on
25
- * your current state and explain your reasoning:
26
- *
27
- * For preliminary requests (getDatabaseSchemas):
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):
20
+ * For preliminary requests: what critical information is missing?
34
21
  *
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.
39
- *
40
- * This reflection helps you avoid duplicate requests and premature
41
- * completion.
22
+ * For completion: what did you acquire, what did you accomplish, why is it
23
+ * sufficient? Summarize don't enumerate every single item.
42
24
  */
43
25
  thinking: string;
44
26
 
45
27
  /**
46
- * Type discriminator for the request.
47
- *
48
- * Determines which action to perform: preliminary data retrieval
49
- * (getDatabaseSchemas) or final error correction (complete). When
50
- * preliminary returns empty array, that type is removed from the union,
51
- * physically preventing repeated calls.
28
+ * Action to perform. Exhausted preliminary types are removed from the
29
+ * union, physically preventing repeated calls.
52
30
  */
53
31
  request: IComplete | IAutoBePreliminaryGetDatabaseSchemas;
54
32
  }
55
33
 
56
- /**
57
- * Request to correct collector implementation errors.
58
- *
59
- * Executes three-phase error correction to resolve TypeScript compilation
60
- * issues in collector functions. Applies systematic fixes following think →
61
- * draft → revise pattern to ensure error-free production code.
62
- */
34
+ /** Correct collector compilation errors via think/draft/revise. */
63
35
  export interface IComplete {
64
- /**
65
- * Type discriminator for the request.
66
- *
67
- * Determines which action to perform: preliminary data retrieval or actual
68
- * task execution. Value "complete" indicates this is the final task
69
- * execution request.
70
- */
36
+ /** Type discriminator for completion request. */
71
37
  type: "complete";
72
38
 
73
39
  /**
74
- * Systematic error analysis and correction strategy.
75
- *
76
- * MUST contain thorough analysis with these four mandatory sections:
40
+ * Systematic error analysis. MUST contain four sections:
77
41
  *
78
- * 1. Error Inventory - Categorize ALL compilation errors by root cause type
79
- * 2. Root Cause Analysis - Identify WHY each error occurs (wrong field, type
42
+ * 1. Error Inventory categorize ALL compilation errors by root cause
43
+ * 2. Root Cause Analysis identify WHY each error occurs (wrong field, type
80
44
  * mismatch, etc.)
81
- * 3. Schema Verification - Cross-check error-related fields against actual
45
+ * 3. Schema Verification cross-check error-related fields against actual
82
46
  * database schema
83
- * 4. Correction Strategy - Specific fix for each error (not workarounds)
47
+ * 4. Correction Strategy specific fix for each error (not workarounds)
84
48
  *
85
49
  * This forces you to understand the REAL problem (not guess) and plan
86
50
  * surgical fixes that address root causes, not symptoms.
@@ -88,103 +52,57 @@ export namespace IAutoBeRealizeCollectorCorrectApplication {
88
52
  think: string;
89
53
 
90
54
  /**
91
- * Field-by-field mapping verification for complete coverage.
55
+ * Field-by-field mapping verification. For each database schema member:
92
56
  *
93
- * Review EVERY field and relation from the database schema to ensure
94
- * correct handling. This systematic approach catches errors beyond what the
95
- * compiler reports and prevents new issues.
96
- *
97
- * For each database schema member, document:
98
- *
99
- * - `member`: Exact field/relation name from database schema
100
- * - `kind`: Whether it's a scalar field, belongsTo, hasOne, or hasMany
101
- * relation
102
- * - `nullable`: Whether the field/relation is nullable (true/false for
103
- * scalar/belongsTo, null for hasMany/hasOne)
57
+ * - `member`: Exact Prisma field/relation name verify against schema
58
+ * - `kind`: scalar, belongsTo, hasOne, or hasMany
59
+ * - `nullable`: true/false for scalar/belongsTo, null for hasMany/hasOne
104
60
  * - `how`: Current state + correction plan ("No change needed", "Fix:
105
- * [problem] → [solution]", etc.)
106
- *
107
- * The `kind` property forces you to consciously identify whether each
108
- * member is a scalar or relation BEFORE deciding how to fix it. This
109
- * prevents common correction errors like treating belongsTo relations as
110
- * scalar fields.
111
- *
112
- * The `nullable` property forces you to explicitly identify nullability
113
- * constraints BEFORE deciding correction strategy. This prevents errors
114
- * like assigning null to non-nullable fields or using null instead of
115
- * undefined for optional belongsTo relations.
61
+ * [problem] → [solution]")
116
62
  *
117
- * Even fields without errors should be included with "No change needed" to
118
- * ensure complete review. Missing even a single field could hide bugs.
63
+ * Even fields without errors must be included with "No change needed" to
64
+ * ensure complete review. MUST include EVERY field/relation from the
65
+ * database schema.
119
66
  *
120
- * This structured verification:
121
- *
122
- * - Catches silent errors compiler didn't report
123
- * - Ensures no fields accidentally omitted
124
- * - Forces explicit classification (kind + nullable) before correction (how)
125
- * - Prevents confusion between scalar fields and relations
126
- * - Prevents null assignment errors through explicit nullability tracking
127
- * - Documents correction decisions explicitly
128
- * - Prevents regression in working fields
129
- *
130
- * The validator will cross-check this against the database schema to ensure
131
- * nothing was overlooked.
67
+ * Missing even a single field will cause validation failure.
132
68
  */
133
69
  mappings: AutoBeRealizeCollectorMapping[];
134
70
 
135
71
  /**
136
- * Initial correction implementation.
137
- *
138
- * Complete corrected code that applies ALL fixes from the think phase
139
- * strategy. EVERY error in think Section 1 inventory MUST be addressed.
140
- * Implement:
72
+ * Complete corrected code. EVERY error from think Section 1 MUST be
73
+ * addressed. Implement:
141
74
  *
142
75
  * - Field name corrections (exact names from database schema)
143
76
  * - Type fixes (proper CreateInput types, nullable handling)
144
77
  * - Neighbor collector reuse (replace inline logic if collector exists)
145
78
  * - Relationship fixes (connect/create syntax)
146
79
  *
147
- * Apply fixes surgically - change ONLY what's broken, preserve working
80
+ * Apply fixes surgically change ONLY what's broken, preserve working
148
81
  * logic.
149
82
  */
150
83
  draft: string;
151
84
 
152
- /**
153
- * Revision and finalization phase.
154
- *
155
- * Reviews the draft corrections and produces the final, error-free code
156
- * that maintains all business requirements.
157
- */
85
+ /** Reviews draft corrections and produces final error-free code. */
158
86
  revise: IReviseProps;
159
87
  }
160
88
 
161
89
  export interface IReviseProps {
162
90
  /**
163
- * Critical correction review and validation.
91
+ * MUST systematically verify four checklists:
164
92
  *
165
- * MUST systematically verify using four checklists:
93
+ * 1. Error Resolution confirm EVERY error from think Section 1 is fixed
94
+ * 2. Root Cause Fix — verify fixes address root causes (not workarounds/hacks)
95
+ * 3. System Rules — neighbor reuse, proper types, no fabricated fields
96
+ * 4. No Regression — confirm no NEW errors, business logic intact
166
97
  *
167
- * 1. Error Resolution - Confirm EVERY error from think Section 1 is fixed
168
- * 2. Root Cause Fix - Verify fixes address root causes (not workarounds/hacks)
169
- * 3. System Rules - Mandatory neighbor reuse, proper types, no fabricated
170
- * fields
171
- * 4. No Regression - Confirm no NEW errors introduced, business logic intact
172
- *
173
- * Identify any remaining issues with line numbers and root cause analysis.
174
98
  * Catch Band-Aid fixes (type assertions, any casts) that hide real
175
99
  * problems.
176
100
  */
177
101
  review: string;
178
102
 
179
103
  /**
180
- * Final error-free collector code with all corrections applied.
181
- *
182
- * Apply ALL remaining fixes identified in the review to produce
183
- * compilation-ready code. If review found issues (workarounds, new errors),
184
- * this MUST contain proper fixes.
185
- *
186
- * Return `null` ONLY if draft is already perfect and review found zero
187
- * issues.
104
+ * Final error-free code with all corrections applied, or null if draft
105
+ * needs no changes.
188
106
  */
189
107
  final: string | null;
190
108
  }
@@ -6,27 +6,17 @@ import { IAutoBePreliminaryGetInterfaceOperations } from "../../common/structure
6
6
  import { IAutoBePreliminaryGetInterfaceSchemas } from "../../common/structures/IAutoBePreliminaryGetInterfaceSchemas";
7
7
 
8
8
  /**
9
- * Function calling interface for planning collector DTO generation.
9
+ * Plans whether a single DTO needs a collector. Sets databaseSchemaName to null
10
+ * for non-collectable DTOs.
10
11
  *
11
- * Guides the AI agent through analyzing a single DTO type and determining
12
- * whether it needs a collector. Each DTO is analyzed independently, enabling
13
- * parallel processing across all DTOs.
14
- *
15
- * The planning follows a structured RAG workflow: preliminary context gathering
16
- * (database schemas, DTO schemas, Operations) → eligibility analysis → plan
17
- * generation.
18
- *
19
- * **Key Decisions**: Not all DTOs require collectors. The agent must
20
- * distinguish collectable DTOs (Create DTO + DB-backed + Direct mapping) from
21
- * non-collectable DTOs (read-only DTOs, computed types) and set
22
- * databaseSchemaName to null for non-collectable ones.
12
+ * **Key Decisions**: Not all DTOs require collectors. Distinguish collectable
13
+ * DTOs (Create DTO + DB-backed + direct mapping) from non-collectable DTOs
14
+ * (read-only DTOs, computed types).
23
15
  */
24
16
  export interface IAutoBeRealizeCollectorPlanApplication {
25
17
  /**
26
- * Process collector planning task or preliminary data requests.
27
- *
28
18
  * Analyzes the given DTO type and generates a plan entry determining whether
29
- * a collector is needed. Returns exactly ONE plan entry for the given DTO.
19
+ * a collector is needed. Returns exactly ONE plan entry.
30
20
  *
31
21
  * @param props Request containing either preliminary data request or complete
32
22
  * plan
@@ -38,39 +28,17 @@ export namespace IAutoBeRealizeCollectorPlanApplication {
38
28
  /**
39
29
  * Think before you act.
40
30
  *
41
- * Before requesting preliminary data or completing your plan, reflect on
42
- * your current state and explain your reasoning:
43
- *
44
- * For preliminary requests:
31
+ * For preliminary requests: what schemas (database, DTO, operations) are
32
+ * missing?
45
33
  *
46
- * - What schemas (database, DTO, Operations) are missing that you need?
47
- * - Why do you need them for planning?
48
- * - Be brief - state the gap, don't list everything you have.
49
- *
50
- * For completion:
51
- *
52
- * - Is this DTO collectable or non-collectable?
53
- * - What database table does it map to (if collectable)?
54
- * - Why is it non-collectable (if applicable)?
55
- *
56
- * This reflection helps you avoid duplicate requests and premature
57
- * completion.
34
+ * For completion: is this DTO collectable or non-collectable? What database
35
+ * table does it map to (if collectable)?
58
36
  */
59
37
  thinking: string;
60
38
 
61
39
  /**
62
- * Type discriminator for the request.
63
- *
64
- * Determines which action to perform:
65
- *
66
- * - "getDatabaseSchemas": Retrieve database table schemas for DB structure
67
- * - "getAnalysisSections": Retrieve analysis sections for context
68
- * - "getInterfaceOperations": Retrieve operation specifications
69
- * - "getInterfaceSchemas": Retrieve DTO type definitions for API contracts
70
- * - "complete": Generate final collector plan
71
- *
72
- * The preliminary types are removed from the union after their respective
73
- * data has been provided, physically preventing repeated calls.
40
+ * Action to perform. Exhausted preliminary types are removed from the
41
+ * union, physically preventing repeated calls.
74
42
  */
75
43
  request:
76
44
  | IComplete
@@ -81,96 +49,51 @@ export namespace IAutoBeRealizeCollectorPlanApplication {
81
49
  }
82
50
 
83
51
  /**
84
- * Request to complete collector planning.
85
- *
86
- * Generates a plan with exactly ONE entry for the given DTO, indicating
87
- * whether it is collectable (has database schema name) or non-collectable
88
- * (null).
52
+ * Generates exactly ONE plan entry indicating collectable (has DB schema
53
+ * name) or not (null).
89
54
  */
90
55
  export interface IComplete {
91
56
  /** Type discriminator for completion request. */
92
57
  type: "complete";
93
58
 
94
59
  /**
95
- * Plan entry for the given DTO.
96
- *
97
- * Must contain exactly ONE entry with:
98
- *
99
- * - DTO type name matching the given DTO
100
- * - Chain of thought explaining the analysis
101
- * - Database schema name if collectable, or null if not
102
- *
103
- * Use databaseSchemaName to distinguish:
104
- *
105
- * - Non-null: Collectable DTO, collector will be generated
106
- * - Null: Non-collectable DTO, no collector needed
60
+ * Exactly ONE entry. databaseSchemaName non-null = collectable, null = no
61
+ * collector needed.
107
62
  */
108
63
  plans: IPlan[];
109
64
  }
110
65
 
111
- /**
112
- * Plan for a single DTO analysis result.
113
- *
114
- * Records the planning decision for one DTO from the operation request.
115
- */
66
+ /** Planning decision for one DTO. */
116
67
  export interface IPlan {
117
68
  /**
118
- * DTO type name being analyzed.
119
- *
120
- * The TypeScript interface type from the operation request body.
121
- *
122
- * Example: "IShoppingSale.ICreate", "IShoppingCategory.ICreate"
69
+ * TypeScript interface type from the operation request body (e.g.,
70
+ * "IShoppingSale.ICreate").
123
71
  */
124
72
  dtoTypeName: string;
125
73
 
126
74
  /**
127
- * Chain of thought for this DTO's planning decision.
128
- *
129
- * Explains the agent's reasoning:
130
- *
131
- * - For collectable DTOs: Why a collector is needed, which database table it
132
- * maps to
133
- * - For non-collectable DTOs: Why no collector is needed (read-only DTO,
134
- * computed type, etc.)
75
+ * Reasoning for this DTO's planning decision.
135
76
  *
136
- * Example (collectable): "Collects IShoppingSale.ICreate to shopping_sales
137
- * with nested category"
77
+ * Collectable: "Collects IShoppingSale.ICreate to shopping_sales with
78
+ * nested category".
138
79
  *
139
- * Example (non-collectable): "IShoppingSale is read-only response DTO, not
140
- * for creation"
80
+ * Non-collectable: "IShoppingSale is read-only response DTO, not for
81
+ * creation".
141
82
  */
142
83
  thinking: string;
143
84
 
144
85
  /**
145
- * Database schema name if collectable, null if not.
146
- *
147
- * - **Non-null**: The database table name this DTO maps to. A collector will
148
- * be generated for this DTO.
149
- * - **Null**: This DTO is non-collectable (read-only DTO, computed type). No
150
- * collector will be generated.
151
- *
152
- * Examples:
153
- *
154
- * - (collectable): "shopping_sales", "shopping_categories"
155
- * - (non-collectable): null
86
+ * Database table name if collectable (e.g., "shopping_sales"), null if
87
+ * non-collectable (read-only DTO, computed type).
156
88
  */
157
89
  databaseSchemaName: string | null;
158
90
 
159
91
  /**
160
92
  * Referenced entities from path parameters or auth context.
161
93
  *
162
- * Each reference contains:
163
- *
164
- * - `databaseSchemaName`: Database table name (e.g., "shopping_sales")
165
- * - `source`: Origin of reference
166
- *
167
- * - "from path parameter {paramName}"
168
- * - "from authorized actor"
169
- * - "from authorized session"
170
- *
171
- * See `AutoBeRealizeCollectorReference` for details.
172
- *
173
- * Empty array means the Create DTO contains all necessary references.
94
+ * Each reference contains `databaseSchemaName` and `source` (e.g., "from
95
+ * path parameter {id}", "from authorized actor"). Empty array means the
96
+ * Create DTO contains all necessary references.
174
97
  */
175
98
  references: AutoBeRealizeCollectorReference[];
176
99
  }
@@ -3,27 +3,13 @@ import { AutoBeRealizeCollectorMapping } from "@autobe/interface";
3
3
  import { IAutoBePreliminaryGetDatabaseSchemas } from "../../common/structures/IAutoBePreliminaryGetDatabaseSchemas";
4
4
 
5
5
  /**
6
- * Function calling interface for generating DTO collector functions.
7
- *
8
- * Guides the AI agent through creating reusable collector modules that prepare
9
- * database input data from API request DTOs (API → DB). Each collector handles
10
- * complex nested relationships, UUID generation, and proper Prisma
11
- * connect/create syntax.
12
- *
13
- * The generation follows a structured RAG workflow: preliminary context
14
- * gathering (database schemas only) → implementation planning → code generation
15
- * → review and refinement. All necessary DTO type information is obtained
16
- * transitively from the DTO type names provided in the plan
17
- * (AutoBeRealizeCollectorPlan).
6
+ * Generates collector functions that convert API request DTOs to Prisma
7
+ * database inputs (API → DB) via plan/draft/revise workflow.
18
8
  */
19
9
  export interface IAutoBeRealizeCollectorWriteApplication {
20
10
  /**
21
11
  * Process collector generation task or preliminary data requests.
22
12
  *
23
- * Generates complete collector module through three-phase workflow (plan →
24
- * draft → revise). Ensures type safety, proper database input types, and
25
- * correct relationship handling.
26
- *
27
13
  * @param props Request containing either preliminary data request or complete
28
14
  * task
29
15
  */
@@ -35,78 +21,36 @@ export namespace IAutoBeRealizeCollectorWriteApplication {
35
21
  /**
36
22
  * Think before you act.
37
23
  *
38
- * Before requesting preliminary data or completing your task, reflect on
39
- * your current state and explain your reasoning:
40
- *
41
- * For preliminary requests:
42
- *
43
- * - What database schemas are missing that you need?
44
- * - Why do you need them for collector generation?
45
- * - Be brief - state the gap, don't list everything you have.
46
- *
47
- * For completion:
24
+ * For preliminary requests: what database schemas are missing and why?
48
25
  *
49
- * - What schemas did you acquire?
50
- * - What collector patterns did you implement?
51
- * - Why is it sufficient to complete?
52
- * - Summarize - don't enumerate every field mapping.
26
+ * For completion: what schemas did you acquire, what patterns did you
27
+ * implement, and why is it sufficient? Summarize — don't enumerate every
28
+ * field.
53
29
  *
54
- * Note: All necessary DTO type information is available transitively from
55
- * the DTO type names in the plan. You only need to request database
56
- * schemas.
57
- *
58
- * This reflection helps you avoid duplicate requests and premature
59
- * completion.
30
+ * Note: All DTO type information is available transitively from the plan's
31
+ * DTO type names. You only need to request database schemas.
60
32
  */
61
33
  thinking: string;
62
34
 
63
35
  /**
64
- * Type discriminator for the request.
65
- *
66
- * Determines which action to perform:
67
- *
68
- * - "getDatabaseSchemas": Retrieve database table schemas for DB structure
69
- * - "complete": Generate final collector implementation
70
- *
71
- * All necessary DTO type information is obtained transitively from the DTO
72
- * type names provided in the plan (AutoBeRealizeCollectorPlan). Each DTO
73
- * type name allows the system to recursively fetch all referenced types,
74
- * providing complete type information without requiring explicit schema
75
- * requests.
76
- *
77
- * The preliminary types are removed from the union after their respective
78
- * data has been provided, physically preventing repeated calls.
36
+ * Action to perform. Exhausted preliminary types are removed from the
37
+ * union, physically preventing repeated calls.
79
38
  */
80
39
  request: IComplete | IAutoBePreliminaryGetDatabaseSchemas;
81
40
  }
82
41
 
83
- /**
84
- * Request to generate collector module implementation.
85
- *
86
- * Executes three-phase generation to create complete collector with:
87
- *
88
- * - Collect() function: Converts DTO to database input
89
- * - Proper handling of nested relationships
90
- * - UUID generation for new records
91
- * - Type-safe Prisma create/connect syntax
92
- *
93
- * Follows plan → draft → revise pattern to ensure type safety and correct
94
- * relationship handling.
95
- */
42
+ /** Generate collector module via plan/draft/revise. */
96
43
  export interface IComplete {
97
44
  /** Type discriminator for completion request. */
98
45
  type: "complete";
99
46
 
100
47
  /**
101
- * Collector implementation plan and strategy.
102
- *
103
- * MUST contain thorough analysis with these four mandatory sections:
48
+ * Collector implementation plan. MUST contain four sections:
104
49
  *
105
- * 1. Database Schema Field Inventory - List ALL fields with exact names from
106
- * schema
107
- * 2. DTO Property Inventory - List ALL properties with types
108
- * 3. Field-by-Field Mapping Strategy - Explicit mapping table for every field
109
- * 4. Edge Cases and Special Handling - Nullable, arrays, conditionals
50
+ * 1. Database Schema Field Inventory ALL fields with exact names from schema
51
+ * 2. DTO Property Inventory — ALL properties with types
52
+ * 3. Field-by-Field Mapping Strategy explicit mapping for every field
53
+ * 4. Edge Cases and Special Handling nullable, arrays, conditionals
110
54
  *
111
55
  * This forces you to READ the actual schema (not imagine it) and creates an
112
56
  * explicit specification that the draft must implement.
@@ -114,93 +58,56 @@ export namespace IAutoBeRealizeCollectorWriteApplication {
114
58
  plan: string;
115
59
 
116
60
  /**
117
- * Field-by-field mapping table for complete database coverage.
61
+ * Field-by-field mapping for complete database coverage.
118
62
  *
119
- * MUST include EVERY field and relation from the database schema - no
63
+ * MUST include EVERY field and relation from the database schema no
120
64
  * exceptions. Each mapping specifies:
121
65
  *
122
- * - `member`: Exact field/relation name from database schema
123
- * - `kind`: Whether it's a scalar field, belongsTo, hasOne, or hasMany
124
- * relation
125
- * - `nullable`: Whether the field/relation is nullable (true/false for
126
- * scalar/belongsTo, null for hasMany/hasOne)
66
+ * - `member`: Exact Prisma field/relation name — read from schema, NOT from
67
+ * DTO property names or FK column names
68
+ * - `kind`: scalar, belongsTo, hasOne, or hasMany
69
+ * - `nullable`: true/false for scalar/belongsTo, null for hasMany/hasOne
127
70
  * - `how`: How to obtain/generate the value for that field
128
71
  *
129
- * The `kind` property forces explicit classification of each member BEFORE
130
- * deciding how to handle it, preventing common errors like treating
131
- * belongsTo relations as scalar fields.
132
- *
133
- * The `nullable` property forces explicit identification of nullability
134
- * constraints BEFORE deciding handling strategy, preventing errors like
135
- * assigning null to non-nullable fields or using null instead of undefined
136
- * for optional relations.
137
- *
138
- * Missing even a single field will cause validation failure and trigger
139
- * regeneration.
72
+ * The `kind` property forces explicit classification BEFORE deciding how to
73
+ * handle it, preventing errors like treating belongsTo as scalar.
140
74
  *
141
- * This structured approach:
142
- *
143
- * - Prevents field omissions through systematic coverage
144
- * - Forces explicit decision-making for each field (kind + nullable + how)
145
- * - Prevents confusion between scalar fields and relations
146
- * - Prevents null assignment errors through explicit nullability tracking
147
- * - Enables validation before code generation
148
- * - Creates clear documentation of field handling strategy
149
- *
150
- * The validator will cross-check this list against the actual database
151
- * schema and reject incomplete mappings.
75
+ * Missing even a single field will cause validation failure.
152
76
  */
153
77
  mappings: AutoBeRealizeCollectorMapping[];
154
78
 
155
79
  /**
156
- * Initial collector implementation draft.
157
- *
158
- * Complete implementation that strictly follows the plan's mapping table.
159
- * EVERY field in the plan's Section 3 mapping strategy MUST appear in this
160
- * draft. Implement:
80
+ * Complete implementation following plan's mapping table. EVERY field from
81
+ * plan Section 3 MUST appear. Implement:
161
82
  *
162
83
  * - Namespace with collect() function
163
- * - All field mappings from plan (direct, connect, nested create)
84
+ * - All field mappings (direct, connect, nested create)
164
85
  * - Neighbor collector reuse (NEVER inline when collector exists)
165
86
  * - UUID generation with v4(), proper Prisma CreateInput types
166
87
  */
167
88
  draft: string;
168
89
 
169
- /**
170
- * Revision and finalization phase.
171
- *
172
- * Reviews the draft implementation and produces the final code with all
173
- * improvements and corrections applied.
174
- */
90
+ /** Reviews draft and produces final code. */
175
91
  revise: IReviseProps;
176
92
  }
177
93
 
178
94
  export interface IReviseProps {
179
95
  /**
180
- * Critical review and improvement analysis.
96
+ * MUST systematically verify four checklists:
181
97
  *
182
- * MUST systematically verify using four checklists:
98
+ * 1. Schema Fidelity cross-check EVERY field name against plan Section 1
99
+ * 2. Plan Adherence — verify EVERY mapping from Section 3 is implemented
100
+ * 3. System Rules — neighbor reuse, props structure, satisfies type
101
+ * 4. Type Safety — compilation check, nullable handling, async/await
183
102
  *
184
- * 1. Schema Fidelity - Cross-check EVERY field name against plan Section 1
185
- * inventory
186
- * 2. Plan Adherence - Verify EVERY mapping from plan Section 3 is implemented
187
- * 3. System Rules - Mandatory neighbor reuse, props structure, satisfies type
188
- * 4. Type Safety - Compilation check, nullable handling, async/await
189
- *
190
- * Identify specific issues with line numbers and provide clear reasoning.
191
- * This catches hallucinated fields, missing mappings, and rule violations.
103
+ * Identify issues with line numbers. This catches hallucinated fields,
104
+ * missing mappings, and rule violations.
192
105
  */
193
106
  review: string;
194
107
 
195
108
  /**
196
- * Final collector code with all review improvements applied.
197
- *
198
- * Apply ALL fixes identified in the review to produce production-ready
199
- * code. If review found issues, this MUST contain the corrected
200
- * implementation.
201
- *
202
- * Return `null` ONLY if the draft is already perfect and review found zero
203
- * issues.
109
+ * Final collector code with all review improvements applied, or null if
110
+ * draft needs no changes.
204
111
  */
205
112
  final: string | null;
206
113
  }