@houtini/lm 1.0.12 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +5 -6
  2. package/dist/index.d.ts +5 -3
  3. package/dist/index.js +142 -213
  4. package/dist/index.js.map +1 -1
  5. package/package.json +10 -33
  6. package/CHANGELOG.md +0 -282
  7. package/dist/cache/analysis-cache.d.ts +0 -33
  8. package/dist/cache/analysis-cache.d.ts.map +0 -1
  9. package/dist/cache/analysis-cache.js +0 -56
  10. package/dist/cache/analysis-cache.js.map +0 -1
  11. package/dist/cache/cache-manager.d.ts +0 -29
  12. package/dist/cache/cache-manager.d.ts.map +0 -1
  13. package/dist/cache/cache-manager.js +0 -85
  14. package/dist/cache/cache-manager.js.map +0 -1
  15. package/dist/cache/index.d.ts +0 -16
  16. package/dist/cache/index.d.ts.map +0 -1
  17. package/dist/cache/index.js +0 -17
  18. package/dist/cache/index.js.map +0 -1
  19. package/dist/cache/prompt-cache.d.ts +0 -33
  20. package/dist/cache/prompt-cache.d.ts.map +0 -1
  21. package/dist/cache/prompt-cache.js +0 -61
  22. package/dist/cache/prompt-cache.js.map +0 -1
  23. package/dist/config.d.ts +0 -41
  24. package/dist/config.d.ts.map +0 -1
  25. package/dist/config.js +0 -71
  26. package/dist/config.js.map +0 -1
  27. package/dist/core/ThreeStagePromptManager.d.ts +0 -23
  28. package/dist/core/ThreeStagePromptManager.d.ts.map +0 -1
  29. package/dist/core/ThreeStagePromptManager.js +0 -118
  30. package/dist/core/ThreeStagePromptManager.js.map +0 -1
  31. package/dist/index.d.ts.map +0 -1
  32. package/dist/plugins/base-plugin.d.ts +0 -55
  33. package/dist/plugins/base-plugin.d.ts.map +0 -1
  34. package/dist/plugins/base-plugin.js +0 -120
  35. package/dist/plugins/base-plugin.js.map +0 -1
  36. package/dist/plugins/index.d.ts +0 -58
  37. package/dist/plugins/index.d.ts.map +0 -1
  38. package/dist/plugins/index.js +0 -162
  39. package/dist/plugins/index.js.map +0 -1
  40. package/dist/plugins/types.d.ts +0 -5
  41. package/dist/plugins/types.d.ts.map +0 -1
  42. package/dist/plugins/types.js +0 -5
  43. package/dist/plugins/types.js.map +0 -1
  44. package/dist/prompts/analyze/code-quality.d.ts +0 -116
  45. package/dist/prompts/analyze/code-quality.d.ts.map +0 -1
  46. package/dist/prompts/analyze/code-quality.js +0 -437
  47. package/dist/prompts/analyze/code-quality.js.map +0 -1
  48. package/dist/prompts/analyze/compare-integration.d.ts +0 -130
  49. package/dist/prompts/analyze/compare-integration.d.ts.map +0 -1
  50. package/dist/prompts/analyze/compare-integration.js +0 -547
  51. package/dist/prompts/analyze/compare-integration.js.map +0 -1
  52. package/dist/prompts/analyze/count-files.d.ts +0 -109
  53. package/dist/prompts/analyze/count-files.d.ts.map +0 -1
  54. package/dist/prompts/analyze/count-files.js +0 -403
  55. package/dist/prompts/analyze/count-files.js.map +0 -1
  56. package/dist/prompts/analyze/database-queries.d.ts +0 -156
  57. package/dist/prompts/analyze/database-queries.d.ts.map +0 -1
  58. package/dist/prompts/analyze/database-queries.js +0 -763
  59. package/dist/prompts/analyze/database-queries.js.map +0 -1
  60. package/dist/prompts/analyze/dependencies.d.ts +0 -97
  61. package/dist/prompts/analyze/dependencies.d.ts.map +0 -1
  62. package/dist/prompts/analyze/dependencies.js +0 -337
  63. package/dist/prompts/analyze/dependencies.js.map +0 -1
  64. package/dist/prompts/analyze/diff-signatures.d.ts +0 -139
  65. package/dist/prompts/analyze/diff-signatures.d.ts.map +0 -1
  66. package/dist/prompts/analyze/diff-signatures.js +0 -708
  67. package/dist/prompts/analyze/diff-signatures.js.map +0 -1
  68. package/dist/prompts/analyze/find-patterns.d.ts +0 -128
  69. package/dist/prompts/analyze/find-patterns.d.ts.map +0 -1
  70. package/dist/prompts/analyze/find-patterns.js +0 -524
  71. package/dist/prompts/analyze/find-patterns.js.map +0 -1
  72. package/dist/prompts/analyze/find-unused-css.d.ts +0 -151
  73. package/dist/prompts/analyze/find-unused-css.d.ts.map +0 -1
  74. package/dist/prompts/analyze/find-unused-css.js +0 -760
  75. package/dist/prompts/analyze/find-unused-css.js.map +0 -1
  76. package/dist/prompts/analyze/n8n-workflow.d.ts +0 -137
  77. package/dist/prompts/analyze/n8n-workflow.d.ts.map +0 -1
  78. package/dist/prompts/analyze/n8n-workflow.js +0 -533
  79. package/dist/prompts/analyze/n8n-workflow.js.map +0 -1
  80. package/dist/prompts/analyze/project-structure.d.ts +0 -126
  81. package/dist/prompts/analyze/project-structure.d.ts.map +0 -1
  82. package/dist/prompts/analyze/project-structure.js +0 -573
  83. package/dist/prompts/analyze/project-structure.js.map +0 -1
  84. package/dist/prompts/analyze/security-audit.d.ts +0 -142
  85. package/dist/prompts/analyze/security-audit.d.ts.map +0 -1
  86. package/dist/prompts/analyze/security-audit.js +0 -641
  87. package/dist/prompts/analyze/security-audit.js.map +0 -1
  88. package/dist/prompts/analyze/single-file.d.ts +0 -162
  89. package/dist/prompts/analyze/single-file.d.ts.map +0 -1
  90. package/dist/prompts/analyze/single-file.js +0 -669
  91. package/dist/prompts/analyze/single-file.js.map +0 -1
  92. package/dist/prompts/analyze/trace-execution.d.ts +0 -126
  93. package/dist/prompts/analyze/trace-execution.d.ts.map +0 -1
  94. package/dist/prompts/analyze/trace-execution.js +0 -613
  95. package/dist/prompts/analyze/trace-execution.js.map +0 -1
  96. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts +0 -116
  97. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +0 -1
  98. package/dist/prompts/analyze/wordpress-plugin-audit.js +0 -456
  99. package/dist/prompts/analyze/wordpress-plugin-audit.js.map +0 -1
  100. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts +0 -103
  101. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts.map +0 -1
  102. package/dist/prompts/analyze/wordpress-plugin-readiness.js +0 -506
  103. package/dist/prompts/analyze/wordpress-plugin-readiness.js.map +0 -1
  104. package/dist/prompts/analyze/wordpress-security.d.ts +0 -146
  105. package/dist/prompts/analyze/wordpress-security.d.ts.map +0 -1
  106. package/dist/prompts/analyze/wordpress-security.js +0 -702
  107. package/dist/prompts/analyze/wordpress-security.js.map +0 -1
  108. package/dist/prompts/analyze/wordpress-theme-audit.d.ts +0 -114
  109. package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +0 -1
  110. package/dist/prompts/analyze/wordpress-theme-audit.js +0 -540
  111. package/dist/prompts/analyze/wordpress-theme-audit.js.map +0 -1
  112. package/dist/prompts/custom/custom-prompt.d.ts +0 -135
  113. package/dist/prompts/custom/custom-prompt.d.ts.map +0 -1
  114. package/dist/prompts/custom/custom-prompt.js +0 -421
  115. package/dist/prompts/custom/custom-prompt.js.map +0 -1
  116. package/dist/prompts/fun/arcade-game.d.ts +0 -152
  117. package/dist/prompts/fun/arcade-game.d.ts.map +0 -1
  118. package/dist/prompts/fun/arcade-game.js +0 -657
  119. package/dist/prompts/fun/arcade-game.js.map +0 -1
  120. package/dist/prompts/fun/create_text_adventure.d.ts +0 -100
  121. package/dist/prompts/fun/create_text_adventure.d.ts.map +0 -1
  122. package/dist/prompts/fun/create_text_adventure.js +0 -401
  123. package/dist/prompts/fun/create_text_adventure.js.map +0 -1
  124. package/dist/prompts/fun/css-art-generator.d.ts +0 -168
  125. package/dist/prompts/fun/css-art-generator.d.ts.map +0 -1
  126. package/dist/prompts/fun/css-art-generator.js +0 -831
  127. package/dist/prompts/fun/css-art-generator.js.map +0 -1
  128. package/dist/prompts/generate/project-documentation.d.ts +0 -137
  129. package/dist/prompts/generate/project-documentation.d.ts.map +0 -1
  130. package/dist/prompts/generate/project-documentation.js +0 -670
  131. package/dist/prompts/generate/project-documentation.js.map +0 -1
  132. package/dist/prompts/generate/refactoring.d.ts +0 -164
  133. package/dist/prompts/generate/refactoring.d.ts.map +0 -1
  134. package/dist/prompts/generate/refactoring.js +0 -625
  135. package/dist/prompts/generate/refactoring.js.map +0 -1
  136. package/dist/prompts/generate/responsive-component.d.ts +0 -147
  137. package/dist/prompts/generate/responsive-component.d.ts.map +0 -1
  138. package/dist/prompts/generate/responsive-component.js +0 -957
  139. package/dist/prompts/generate/responsive-component.js.map +0 -1
  140. package/dist/prompts/generate/typescript-conversion.d.ts +0 -144
  141. package/dist/prompts/generate/typescript-conversion.d.ts.map +0 -1
  142. package/dist/prompts/generate/typescript-conversion.js +0 -531
  143. package/dist/prompts/generate/typescript-conversion.js.map +0 -1
  144. package/dist/prompts/generate/unit-tests.d.ts +0 -139
  145. package/dist/prompts/generate/unit-tests.d.ts.map +0 -1
  146. package/dist/prompts/generate/unit-tests.js +0 -582
  147. package/dist/prompts/generate/unit-tests.js.map +0 -1
  148. package/dist/prompts/generate/wordpress-plugin.d.ts +0 -179
  149. package/dist/prompts/generate/wordpress-plugin.d.ts.map +0 -1
  150. package/dist/prompts/generate/wordpress-plugin.js +0 -767
  151. package/dist/prompts/generate/wordpress-plugin.js.map +0 -1
  152. package/dist/prompts/generate/wordpress-theme-from-static.d.ts +0 -177
  153. package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +0 -1
  154. package/dist/prompts/generate/wordpress-theme-from-static.js +0 -699
  155. package/dist/prompts/generate/wordpress-theme-from-static.js.map +0 -1
  156. package/dist/prompts/shared/cache-manager.d.ts +0 -45
  157. package/dist/prompts/shared/cache-manager.d.ts.map +0 -1
  158. package/dist/prompts/shared/cache-manager.js +0 -129
  159. package/dist/prompts/shared/cache-manager.js.map +0 -1
  160. package/dist/prompts/shared/helpers.d.ts +0 -39
  161. package/dist/prompts/shared/helpers.d.ts.map +0 -1
  162. package/dist/prompts/shared/helpers.js +0 -151
  163. package/dist/prompts/shared/helpers.js.map +0 -1
  164. package/dist/prompts/shared/templates.d.ts +0 -35
  165. package/dist/prompts/shared/templates.d.ts.map +0 -1
  166. package/dist/prompts/shared/templates.js +0 -77
  167. package/dist/prompts/shared/templates.js.map +0 -1
  168. package/dist/prompts/shared/types.d.ts +0 -112
  169. package/dist/prompts/shared/types.d.ts.map +0 -1
  170. package/dist/prompts/shared/types.js +0 -5
  171. package/dist/prompts/shared/types.js.map +0 -1
  172. package/dist/prompts/system/find-unused-files.d.ts +0 -106
  173. package/dist/prompts/system/find-unused-files.d.ts.map +0 -1
  174. package/dist/prompts/system/find-unused-files.js +0 -357
  175. package/dist/prompts/system/find-unused-files.js.map +0 -1
  176. package/dist/security/index.d.ts +0 -39
  177. package/dist/security/index.d.ts.map +0 -1
  178. package/dist/security/index.js +0 -46
  179. package/dist/security/index.js.map +0 -1
  180. package/dist/security/integration-helpers.d.ts +0 -121
  181. package/dist/security/integration-helpers.d.ts.map +0 -1
  182. package/dist/security/integration-helpers.js +0 -190
  183. package/dist/security/integration-helpers.js.map +0 -1
  184. package/dist/security/output-encoder.d.ts +0 -94
  185. package/dist/security/output-encoder.d.ts.map +0 -1
  186. package/dist/security/output-encoder.js +0 -295
  187. package/dist/security/output-encoder.js.map +0 -1
  188. package/dist/security/prompt-injection-guard.d.ts +0 -59
  189. package/dist/security/prompt-injection-guard.d.ts.map +0 -1
  190. package/dist/security/prompt-injection-guard.js +0 -249
  191. package/dist/security/prompt-injection-guard.js.map +0 -1
  192. package/dist/security/sanitisation.d.ts +0 -67
  193. package/dist/security/sanitisation.d.ts.map +0 -1
  194. package/dist/security/sanitisation.js +0 -398
  195. package/dist/security/sanitisation.js.map +0 -1
  196. package/dist/security/security-service.d.ts +0 -103
  197. package/dist/security/security-service.d.ts.map +0 -1
  198. package/dist/security/security-service.js +0 -303
  199. package/dist/security/security-service.js.map +0 -1
  200. package/dist/security-config.d.ts +0 -45
  201. package/dist/security-config.d.ts.map +0 -1
  202. package/dist/security-config.js +0 -63
  203. package/dist/security-config.js.map +0 -1
  204. package/dist/system/function-list.d.ts +0 -61
  205. package/dist/system/function-list.d.ts.map +0 -1
  206. package/dist/system/function-list.js +0 -111
  207. package/dist/system/function-list.js.map +0 -1
  208. package/dist/system/function-registry.d.ts +0 -23
  209. package/dist/system/function-registry.d.ts.map +0 -1
  210. package/dist/system/function-registry.js +0 -136
  211. package/dist/system/function-registry.js.map +0 -1
  212. package/dist/system/health-check.d.ts +0 -33
  213. package/dist/system/health-check.d.ts.map +0 -1
  214. package/dist/system/health-check.js +0 -98
  215. package/dist/system/health-check.js.map +0 -1
  216. package/dist/system/path-resolver.d.ts +0 -55
  217. package/dist/system/path-resolver.d.ts.map +0 -1
  218. package/dist/system/path-resolver.js +0 -90
  219. package/dist/system/path-resolver.js.map +0 -1
  220. package/dist/templates/plugin-template.d.ts +0 -121
  221. package/dist/templates/plugin-template.d.ts.map +0 -1
  222. package/dist/templates/plugin-template.js +0 -454
  223. package/dist/templates/plugin-template.js.map +0 -1
  224. package/dist/types/chunking-types.d.ts +0 -88
  225. package/dist/types/chunking-types.d.ts.map +0 -1
  226. package/dist/types/chunking-types.js +0 -18
  227. package/dist/types/chunking-types.js.map +0 -1
  228. package/dist/types/prompt-stages.d.ts +0 -30
  229. package/dist/types/prompt-stages.d.ts.map +0 -1
  230. package/dist/types/prompt-stages.js +0 -6
  231. package/dist/types/prompt-stages.js.map +0 -1
  232. package/dist/types.d.ts +0 -45
  233. package/dist/types.d.ts.map +0 -1
  234. package/dist/types.js +0 -6
  235. package/dist/types.js.map +0 -1
  236. package/dist/utils/css-parser.d.ts +0 -26
  237. package/dist/utils/css-parser.d.ts.map +0 -1
  238. package/dist/utils/css-parser.js +0 -117
  239. package/dist/utils/css-parser.js.map +0 -1
  240. package/dist/utils/path-resolver.d.ts +0 -13
  241. package/dist/utils/path-resolver.d.ts.map +0 -1
  242. package/dist/utils/path-resolver.js +0 -78
  243. package/dist/utils/path-resolver.js.map +0 -1
  244. package/dist/utils/plugin-utilities.d.ts +0 -176
  245. package/dist/utils/plugin-utilities.d.ts.map +0 -1
  246. package/dist/utils/plugin-utilities.js +0 -269
  247. package/dist/utils/plugin-utilities.js.map +0 -1
  248. package/dist/utils/streamHandler.d.ts +0 -3
  249. package/dist/utils/streamHandler.d.ts.map +0 -1
  250. package/dist/utils/streamHandler.js +0 -137
  251. package/dist/utils/streamHandler.js.map +0 -1
  252. package/dist/validation/output-validator.d.ts +0 -136
  253. package/dist/validation/output-validator.d.ts.map +0 -1
  254. package/dist/validation/output-validator.js +0 -262
  255. package/dist/validation/output-validator.js.map +0 -1
  256. package/dist/validation/response-factory.d.ts +0 -44
  257. package/dist/validation/response-factory.d.ts.map +0 -1
  258. package/dist/validation/response-factory.js +0 -202
  259. package/dist/validation/response-factory.js.map +0 -1
  260. package/dist/validation/schemas.d.ts +0 -519
  261. package/dist/validation/schemas.d.ts.map +0 -1
  262. package/dist/validation/schemas.js +0 -6
  263. package/dist/validation/schemas.js.map +0 -1
@@ -1,573 +0,0 @@
1
- /**
2
- * Plugin Template - Modern v4.2 (Single Source of Truth)
3
- *
4
- * Universal template that intelligently handles both single-file and multi-file analysis
5
- * Automatically detects analysis type based on provided parameters
6
- *
7
- * Copy this template for creating any new plugin - it adapts to your needs
8
- */
9
- import { BasePlugin } from '../../plugins/base-plugin.js';
10
- import { ThreeStagePromptManager } from '../../core/ThreeStagePromptManager.js';
11
- import { withSecurity } from '../../security/integration-helpers.js';
12
- import { readFileContent } from '../shared/helpers.js';
13
- import { ModelSetup, ResponseProcessor, ParameterValidator, ErrorHandler, MultiFileAnalysis, TokenCalculator } from '../../utils/plugin-utilities.js';
14
- import { getAnalysisCache } from '../../cache/index.js';
15
- // Common Node.js modules - Use these instead of require()
16
- import { basename, dirname, extname, relative } from 'path';
17
- import { readFile, stat } from 'fs/promises';
18
- export class ProjectStructureAnalyzer extends BasePlugin {
19
- constructor() {
20
- super();
21
- this.name = 'analyze_project_structure';
22
- this.category = 'analyze';
23
- this.description = 'Analyze complete project structure and architecture with actionable strategic recommendations';
24
- // Universal parameter set - supports both single and multi-file scenarios
25
- this.parameters = {
26
- // Single-file parameters
27
- code: {
28
- type: 'string',
29
- description: 'The code to analyze (for single-file analysis)',
30
- required: false
31
- },
32
- filePath: {
33
- type: 'string',
34
- description: 'Path to single file to analyze',
35
- required: false
36
- },
37
- // Multi-file parameters
38
- projectPath: {
39
- type: 'string',
40
- description: 'Absolute path to project root',
41
- required: false
42
- },
43
- files: {
44
- type: 'array',
45
- description: 'Array of specific file paths (for multi-file analysis)',
46
- required: false,
47
- items: { type: 'string' }
48
- },
49
- maxDepth: {
50
- type: 'number',
51
- description: 'Maximum directory depth to analyze (1-5)',
52
- required: false,
53
- default: 3
54
- },
55
- // Universal parameters
56
- language: {
57
- type: 'string',
58
- description: 'Programming language',
59
- required: false,
60
- default: 'javascript'
61
- },
62
- analysisDepth: {
63
- type: 'string',
64
- description: 'Level of analysis detail',
65
- enum: ['basic', 'detailed', 'comprehensive'],
66
- default: 'detailed',
67
- required: false
68
- },
69
- analysisType: {
70
- type: 'string',
71
- description: 'Type of analysis to perform',
72
- enum: ['architecture', 'patterns', 'comprehensive'],
73
- default: 'comprehensive',
74
- required: false
75
- },
76
- focusAreas: {
77
- type: 'array',
78
- description: 'Areas to focus on: architecture, dependencies, complexity, patterns',
79
- required: false,
80
- default: [],
81
- items: { type: 'string' }
82
- }
83
- };
84
- this.analysisCache = getAnalysisCache();
85
- this.multiFileAnalysis = new MultiFileAnalysis();
86
- // Cache and analysis utilities are initialized above
87
- }
88
- async execute(params, llmClient) {
89
- return await withSecurity(this, params, llmClient, async (secureParams) => {
90
- try {
91
- // 1. Auto-detect analysis mode based on parameters
92
- const analysisMode = this.detectAnalysisMode(secureParams);
93
- // 2. Validate parameters based on detected mode
94
- this.validateParameters(secureParams, analysisMode);
95
- // 3. Setup model
96
- const { model, contextLength } = await ModelSetup.getReadyModel(llmClient);
97
- // 4. Route to appropriate analysis method
98
- if (analysisMode === 'single-file') {
99
- return await this.executeSingleFileAnalysis(secureParams, model, contextLength);
100
- }
101
- else {
102
- return await this.executeMultiFileAnalysis(secureParams, model, contextLength);
103
- }
104
- }
105
- catch (error) {
106
- return ErrorHandler.createExecutionError('analyze_project_structure', error);
107
- }
108
- });
109
- }
110
- /**
111
- * Auto-detect whether this is single-file or multi-file analysis
112
- */
113
- detectAnalysisMode(params) {
114
- // Single-file indicators take priority (avoids default parameter issues)
115
- if (params.code || params.filePath) {
116
- return 'single-file';
117
- }
118
- // Multi-file indicators
119
- if (params.projectPath || params.files) {
120
- return 'multi-file';
121
- }
122
- // Default to multi-file for project structure analysis
123
- return 'multi-file';
124
- }
125
- /**
126
- * Validate parameters based on detected analysis mode
127
- */
128
- validateParameters(params, mode) {
129
- if (mode === 'single-file') {
130
- ParameterValidator.validateCodeOrFile(params);
131
- }
132
- else {
133
- ParameterValidator.validateProjectPath(params);
134
- ParameterValidator.validateDepth(params);
135
- }
136
- // Universal validations
137
- ParameterValidator.validateEnum(params, 'analysisType', ['architecture', 'patterns', 'comprehensive']);
138
- ParameterValidator.validateEnum(params, 'analysisDepth', ['basic', 'detailed', 'comprehensive']);
139
- }
140
- /**
141
- * Execute single-file analysis
142
- */
143
- async executeSingleFileAnalysis(params, model, contextLength) {
144
- // Process single file input
145
- let codeToAnalyze = params.code;
146
- if (params.filePath) {
147
- codeToAnalyze = await readFileContent(params.filePath);
148
- }
149
- // Generate prompt stages for single file
150
- const promptStages = this.getSingleFilePromptStages({
151
- ...params,
152
- code: codeToAnalyze
153
- });
154
- // Execute with appropriate method
155
- const promptManager = new ThreeStagePromptManager();
156
- const needsChunking = TokenCalculator.needsChunking(promptStages, contextLength);
157
- if (needsChunking) {
158
- const chunkSize = TokenCalculator.calculateOptimalChunkSize(promptStages, contextLength);
159
- const dataChunks = promptManager.chunkDataPayload(promptStages.dataPayload, chunkSize);
160
- const conversation = promptManager.createChunkedConversation(promptStages, dataChunks);
161
- const messages = [
162
- conversation.systemMessage,
163
- ...conversation.dataMessages,
164
- conversation.analysisMessage
165
- ];
166
- return await ResponseProcessor.executeChunked(messages, model, contextLength, 'analyze_project_structure', 'single');
167
- }
168
- else {
169
- return await ResponseProcessor.executeDirect(promptStages, model, contextLength, 'analyze_project_structure');
170
- }
171
- }
172
- /**
173
- * Execute multi-file analysis
174
- */
175
- async executeMultiFileAnalysis(params, model, contextLength) {
176
- // Discover files
177
- let filesToAnalyze = params.files ||
178
- await this.discoverRelevantFiles(params.projectPath, params.maxDepth, params.analysisType);
179
- // Perform multi-file analysis with caching
180
- const analysisResult = await this.performMultiFileAnalysis(filesToAnalyze, params, model, contextLength);
181
- // Generate prompt stages for multi-file
182
- const promptStages = this.getMultiFilePromptStages({
183
- ...params,
184
- analysisResult,
185
- fileCount: filesToAnalyze.length
186
- });
187
- // Always use chunking for multi-file
188
- const promptManager = new ThreeStagePromptManager();
189
- const chunkSize = TokenCalculator.calculateOptimalChunkSize(promptStages, contextLength);
190
- const dataChunks = promptManager.chunkDataPayload(promptStages.dataPayload, chunkSize);
191
- const conversation = promptManager.createChunkedConversation(promptStages, dataChunks);
192
- const messages = [
193
- conversation.systemMessage,
194
- ...conversation.dataMessages,
195
- conversation.analysisMessage
196
- ];
197
- return await ResponseProcessor.executeChunked(messages, model, contextLength, 'analyze_project_structure', 'multifile');
198
- }
199
- /**
200
- * Single-file structure analysis - focuses on file's role in larger architecture
201
- */
202
- getSingleFilePromptStages(params) {
203
- const { code, language, analysisDepth, analysisType, filePath } = params;
204
- const fileName = filePath ? basename(filePath) : 'unknown';
205
- const focusAreas = params.focusAreas || [];
206
- const systemAndContext = `You are a senior software architect with 15+ years of experience analyzing codebases and providing strategic guidance to development teams.
207
-
208
- **YOUR EXPERTISE:**
209
- - Identifying architectural patterns and anti-patterns
210
- - Recognizing scalability bottlenecks and technical debt
211
- - Providing actionable recommendations that balance pragmatism with best practices
212
- - Understanding business impact of technical decisions
213
-
214
- **ANALYSIS CONTEXT:**
215
- - File: ${fileName}
216
- - Language: ${language}
217
- - Analysis Depth: ${analysisDepth}
218
- - Analysis Type: ${analysisType}
219
- - Focus Areas: ${focusAreas.length ? focusAreas.join(', ') : 'comprehensive'}
220
- - Mode: Single File Architectural Analysis
221
-
222
- **YOUR MISSION:**
223
- Analyze this file's role in the broader architecture. Don't just describe what it does - explain its strategic importance, potential issues, and how it fits into modern software patterns.`;
224
- const dataPayload = `File to analyze: ${fileName}
225
-
226
- \`\`\`${language}
227
- ${code}
228
- \`\`\``;
229
- const outputInstructions = `Provide comprehensive architectural analysis of this file covering:
230
-
231
- **Executive Summary:**
232
- - **File Role**: What role does this file play in the overall architecture?
233
- - **Architectural Pattern**: What pattern does this file implement or support?
234
- - **Business Criticality**: How critical is this file to business operations?
235
-
236
- **Structural Analysis:**
237
- - **Primary Responsibilities**: List the main responsibilities of this file
238
- - **Dependencies**:
239
- - Key imports and what this file relies on
240
- - What this file exports and provides to other parts
241
- - Coupling assessment (tight/loose/moderate) with explanation
242
- - **Design Patterns**: Identify any design patterns used in this file
243
- - **Code Organization**: Assessment of how well the code is structured internally
244
-
245
- **Architectural Insights:**
246
- - **Strengths & Opportunities**: What this file does well architecturally
247
- - **Technical Debt**: Areas where technical debt is accumulating
248
- - **Scalability Considerations**: How will this file behave as the system grows?
249
- - **Maintainability Score**: Rate 1-10 with detailed explanation
250
-
251
- **Strategic Recommendations:**
252
- For each recommendation, provide:
253
- - **Priority**: High/medium/low priority level
254
- - **Recommendation**: Specific actionable recommendation
255
- - **Rationale**: Why this matters for the business/team
256
- - **Effort**: Low/medium/high implementation effort
257
- - **Impact**: Business or technical impact of implementing this
258
-
259
- **Confidence Assessment:** Your confidence level in this analysis
260
-
261
- Focus on strategic architectural insights that help developers make better decisions, not just code review comments.`;
262
- return { systemAndContext, dataPayload, outputInstructions };
263
- }
264
- /**
265
- * Multi-file project structure analysis - comprehensive architectural overview
266
- */
267
- getMultiFilePromptStages(params) {
268
- const { analysisResult, analysisType, analysisDepth, fileCount, projectPath } = params;
269
- const focusAreas = params.focusAreas || [];
270
- const projectName = projectPath ? basename(projectPath) : 'Project';
271
- const systemAndContext = `You are a senior software architect and technical consultant specializing in ${analysisDepth} ${analysisType} analysis.
272
-
273
- **YOUR EXPERTISE:**
274
- - 15+ years architecting scalable software systems
275
- - Expert in identifying patterns, anti-patterns, and architectural smells
276
- - Skilled at translating technical analysis into business recommendations
277
- - Proven track record helping teams improve system design and maintainability
278
-
279
- **PROJECT CONTEXT:**
280
- - Project: ${projectName}
281
- - Files Analyzed: ${fileCount}
282
- - Analysis Type: ${analysisType}
283
- - Analysis Depth: ${analysisDepth}
284
- - Focus Areas: ${focusAreas.length ? focusAreas.join(', ') : 'comprehensive architecture'}
285
- - Mode: Complete Project Architecture Analysis
286
-
287
- **YOUR MISSION:**
288
- Provide a comprehensive architectural assessment that helps the development team understand their system's current state and chart a path forward. Focus on actionable insights that balance technical excellence with practical business needs.`;
289
- const dataPayload = `Complete project structure analysis:
290
-
291
- ${JSON.stringify(analysisResult, null, 2)}`;
292
- const outputInstructions = `Provide comprehensive project architecture analysis covering:
293
-
294
- **Executive Summary:**
295
- - **Overall Architectural Health**: Assess as excellent/good/concerning/poor with 2-sentence explanation
296
- - **Primary Strengths**: Top 3 architectural strengths of this project
297
- - **Critical Concerns**: Top 3 areas requiring immediate attention
298
- - **Recommended Focus**: What should the team prioritize next?
299
-
300
- **Architectural Overview:**
301
- - **Detected Patterns**: For each pattern found:
302
- - Pattern name (e.g., MVC, Microservices, Layered)
303
- - Implementation quality (well/partially/poorly implemented)
304
- - Impact on the system
305
- - **System Complexity**:
306
- - Complexity level (low/moderate/high/excessive)
307
- - Justification for this complexity level
308
- - Whether the complexity is manageable
309
- - **Code Organization**:
310
- - Directory structure assessment (well-organized/adequate/chaotic)
311
- - Separation of concerns (clear/mixed/tangled)
312
- - Consistency score (1-10 with explanation)
313
-
314
- **Dependency Analysis:**
315
- - **External Dependencies**:
316
- - Count and risk level assessment (low/medium/high)
317
- - List of concerning outdated dependencies
318
- - Dependency management recommendations
319
- - **Internal Coupling**:
320
- - Coupling level (loose/moderate/tight)
321
- - Files or modules with coupling issues
322
- - Specific decoupling suggestions
323
-
324
- **Quality and Maintainability:**
325
- - **Code Quality Score**: Rate 1-10 with detailed explanation
326
- - **Technical Debt Areas**: For each area:
327
- - Specific area of technical debt
328
- - Severity (low/medium/high/critical)
329
- - Business impact explanation
330
- - Specific remediation steps
331
- - **Testability**: Assessment of how easy this codebase is to test
332
- - **Documentation**: Current state of project documentation
333
-
334
- **Scalability and Performance:**
335
- - **Current Scalability**: Assessment of how well this system will scale
336
- - **Performance Bottlenecks**: Identified or potential performance issues
337
- - **Resource Utilization**: Efficient or concerning resource usage patterns
338
- - **Scaling Recommendations**: Specific recommendations for growth
339
-
340
- **Strategic Recommendations:**
341
- For each recommendation, provide:
342
- - **Category**: architecture/dependencies/quality/performance/team
343
- - **Priority**: critical/high/medium/low
344
- - **Recommendation**: Specific actionable recommendation
345
- - **Business Justification**: Why this matters for business success
346
- - **Technical Justification**: Technical reasoning
347
- - **Estimated Effort**: hours/days/weeks/months
348
- - **Expected Impact**: Measurable impact on team or system
349
- - **Prerequisites**: What needs to happen first
350
- - **Risk of Not Implementing**: What happens if this is ignored
351
-
352
- **Next Steps:**
353
- - **Immediate Actions**: Actions to take this week
354
- - **Short-term Actions**: Actions for next 1-3 months
355
- - **Long-term Initiatives**: Strategic initiatives for 6+ months
356
- - **Team Capability Needs**: Skills or knowledge the team should develop
357
-
358
- Focus on recommendations that help the team ship better software faster. Every suggestion should clearly explain both the technical benefit and business value.`;
359
- return { systemAndContext, dataPayload, outputInstructions };
360
- }
361
- /**
362
- * Backwards compatibility method
363
- */
364
- getPromptStages(params) {
365
- const mode = this.detectAnalysisMode(params);
366
- if (mode === 'single-file') {
367
- return this.getSingleFilePromptStages(params);
368
- }
369
- else {
370
- return this.getMultiFilePromptStages(params);
371
- }
372
- }
373
- // Multi-file helper methods
374
- async discoverRelevantFiles(projectPath, maxDepth, analysisType) {
375
- const extensions = this.getFileExtensions(analysisType);
376
- return await this.multiFileAnalysis.discoverFiles(projectPath, extensions, maxDepth);
377
- }
378
- async performMultiFileAnalysis(files, params, model, contextLength) {
379
- const cacheKey = this.analysisCache.generateKey('analyze_project_structure', params, files);
380
- const cached = await this.analysisCache.get(cacheKey);
381
- if (cached)
382
- return cached;
383
- const fileAnalysisResults = await this.multiFileAnalysis.analyzeBatch(files, (file) => this.analyzeIndividualFile(file, params, model), contextLength);
384
- // Aggregate results into comprehensive project analysis
385
- const aggregatedResult = {
386
- summary: `Project structure analysis of ${files.length} files`,
387
- projectMetrics: {
388
- totalFiles: files.length,
389
- totalSize: fileAnalysisResults.reduce((sum, result) => sum + (result.size || 0), 0),
390
- averageFileSize: Math.round(fileAnalysisResults.reduce((sum, result) => sum + (result.size || 0), 0) / files.length),
391
- totalLines: fileAnalysisResults.reduce((sum, result) => sum + (result.lines || 0), 0),
392
- fileTypeDistribution: this.analyzeFileTypes(fileAnalysisResults),
393
- directoryStructure: this.analyzeDirectoryStructure(files, params.projectPath)
394
- },
395
- architecturalInsights: {
396
- largestFiles: fileAnalysisResults
397
- .sort((a, b) => (b.size || 0) - (a.size || 0))
398
- .slice(0, 10)
399
- .map(f => ({ path: f.relativePath, size: f.size, lines: f.lines })),
400
- complexityIndicators: this.calculateComplexityMetrics(fileAnalysisResults),
401
- organizationPatterns: this.identifyOrganizationPatterns(files),
402
- dependencyStructure: this.analyzeDependencyStructure(fileAnalysisResults)
403
- },
404
- fileAnalysisResults
405
- };
406
- await this.analysisCache.cacheAnalysis(cacheKey, aggregatedResult, {
407
- modelUsed: model.identifier || 'unknown',
408
- executionTime: Date.now() - Date.now(), // TODO: Track actual execution time
409
- timestamp: new Date().toISOString()
410
- });
411
- return aggregatedResult;
412
- }
413
- async analyzeIndividualFile(file, params, model) {
414
- const content = await readFile(file, 'utf-8');
415
- const stats = await stat(file);
416
- return {
417
- filePath: file,
418
- fileName: basename(file),
419
- size: content.length,
420
- lines: content.split('\n').length,
421
- extension: extname(file),
422
- relativePath: relative(params.projectPath || '', file),
423
- directory: dirname(relative(params.projectPath || '', file)),
424
- isEmpty: content.trim().length === 0,
425
- isConfigFile: this.isConfigFile(file),
426
- isTestFile: this.isTestFile(file),
427
- lastModified: stats.mtime,
428
- // Basic complexity indicators
429
- functionsCount: this.countFunctions(content),
430
- importsCount: this.countImports(content),
431
- exportsCount: this.countExports(content)
432
- };
433
- }
434
- getFileExtensions(analysisType) {
435
- const extensionMap = {
436
- 'architecture': ['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.php', '.rb', '.go', '.json', '.yaml', '.yml', '.xml'],
437
- 'patterns': ['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.php', '.rb', '.go', '.vue', '.svelte'],
438
- 'comprehensive': ['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.php', '.rb', '.go', '.vue', '.svelte', '.json', '.yaml', '.yml', '.xml', '.md', '.txt', '.css', '.scss', '.less']
439
- };
440
- return extensionMap[analysisType] || extensionMap.comprehensive;
441
- }
442
- // Helper methods for analysis
443
- analyzeFileTypes(results) {
444
- const typeCount = {};
445
- results.forEach(result => {
446
- const ext = result.extension || 'no-extension';
447
- typeCount[ext] = (typeCount[ext] || 0) + 1;
448
- });
449
- return typeCount;
450
- }
451
- analyzeDirectoryStructure(files, projectPath) {
452
- const structure = {};
453
- files.forEach(file => {
454
- const relativePath = projectPath ? relative(projectPath, file) : file;
455
- const parts = relativePath.split(/[\/\\]/);
456
- let current = structure;
457
- parts.forEach((part, index) => {
458
- if (index === parts.length - 1) {
459
- // It's a file
460
- if (!current._files)
461
- current._files = [];
462
- current._files.push(part);
463
- }
464
- else {
465
- // It's a directory
466
- if (!current[part])
467
- current[part] = {};
468
- current = current[part];
469
- }
470
- });
471
- });
472
- return structure;
473
- }
474
- calculateComplexityMetrics(results) {
475
- const sizes = results.map(r => r.size || 0);
476
- const lines = results.map(r => r.lines || 0);
477
- return {
478
- fileSizeVariance: this.calculateVariance(sizes),
479
- lineLengthVariance: this.calculateVariance(lines),
480
- largeFileCount: sizes.filter(s => s > 10000).length,
481
- veryLargeFileCount: sizes.filter(s => s > 50000).length
482
- };
483
- }
484
- identifyOrganizationPatterns(files) {
485
- const patterns = [];
486
- // Check for common patterns
487
- if (files.some(f => f.includes('/src/')))
488
- patterns.push('src-directory');
489
- if (files.some(f => f.includes('/lib/')))
490
- patterns.push('lib-directory');
491
- if (files.some(f => f.includes('/components/')))
492
- patterns.push('component-structure');
493
- if (files.some(f => f.includes('/utils/') || f.includes('/helpers/')))
494
- patterns.push('utility-separation');
495
- if (files.some(f => f.includes('/test/') || f.includes('/__tests__/')))
496
- patterns.push('test-organization');
497
- if (files.some(f => f.includes('/config/')))
498
- patterns.push('configuration-separation');
499
- return patterns;
500
- }
501
- analyzeDependencyStructure(results) {
502
- const totalImports = results.reduce((sum, r) => sum + (r.importsCount || 0), 0);
503
- const totalExports = results.reduce((sum, r) => sum + (r.exportsCount || 0), 0);
504
- const filesWithImports = results.filter(r => (r.importsCount || 0) > 0).length;
505
- const filesWithExports = results.filter(r => (r.exportsCount || 0) > 0).length;
506
- return {
507
- totalImports,
508
- totalExports,
509
- averageImportsPerFile: filesWithImports ? Math.round(totalImports / filesWithImports) : 0,
510
- averageExportsPerFile: filesWithExports ? Math.round(totalExports / filesWithExports) : 0,
511
- interconnectionLevel: filesWithImports / results.length
512
- };
513
- }
514
- // Utility methods
515
- isConfigFile(file) {
516
- const configPatterns = ['.json', '.yaml', '.yml', '.xml', '.ini', '.toml', '.config.', 'package.json', 'tsconfig.', 'webpack.', 'babel.'];
517
- return configPatterns.some(pattern => file.includes(pattern));
518
- }
519
- isTestFile(file) {
520
- const testPatterns = ['.test.', '.spec.', '__test__', '__spec__', '/test/', '/tests/', '/spec/'];
521
- return testPatterns.some(pattern => file.includes(pattern));
522
- }
523
- countFunctions(content) {
524
- // Simple function counting - can be enhanced
525
- const functionPatterns = [
526
- /function\s+\w+/g,
527
- /const\s+\w+\s*=\s*\(/g,
528
- /let\s+\w+\s*=\s*\(/g,
529
- /\w+\s*:\s*function/g,
530
- /\w+\s*=>\s*/g
531
- ];
532
- return functionPatterns.reduce((count, pattern) => {
533
- const matches = content.match(pattern);
534
- return count + (matches ? matches.length : 0);
535
- }, 0);
536
- }
537
- countImports(content) {
538
- const importPatterns = [
539
- /^import\s+/gm,
540
- /^const\s+.*=\s*require\(/gm,
541
- /^from\s+.*import/gm
542
- ];
543
- return importPatterns.reduce((count, pattern) => {
544
- const matches = content.match(pattern);
545
- return count + (matches ? matches.length : 0);
546
- }, 0);
547
- }
548
- countExports(content) {
549
- const exportPatterns = [
550
- /^export\s+/gm,
551
- /^module\.exports/gm,
552
- /^exports\./gm
553
- ];
554
- return exportPatterns.reduce((count, pattern) => {
555
- const matches = content.match(pattern);
556
- return count + (matches ? matches.length : 0);
557
- }, 0);
558
- }
559
- calculateVariance(numbers) {
560
- if (numbers.length === 0)
561
- return 0;
562
- const mean = numbers.reduce((sum, n) => sum + n, 0) / numbers.length;
563
- const squaredDiffs = numbers.map(n => Math.pow(n - mean, 2));
564
- return squaredDiffs.reduce((sum, diff) => sum + diff, 0) / numbers.length;
565
- }
566
- generateCacheKey(files, params) {
567
- const fileHash = files.join('|');
568
- const paramHash = JSON.stringify(params);
569
- return `${fileHash}_${paramHash}`.substring(0, 64);
570
- }
571
- }
572
- export default ProjectStructureAnalyzer;
573
- //# sourceMappingURL=project-structure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-structure.js","sourceRoot":"","sources":["../../../src/prompts/analyze/project-structure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,0DAA0D;AAC1D,OAAO,EAAE,QAAQ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