-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcat_files_ext_feed_to_llm
79 lines (57 loc) · 4.15 KB
/
cat_files_ext_feed_to_llm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
This CLI code leverages https://llm.datasette.io/en/stable/index.html to analyze files by extension
```
find . -name "*.groovy" -exec cat {} + | llm -m mistral-7b-instruct-v0 -s "You are tasked with analyzing a batch of Groovy files to identify common use cases and opportunities for improvement. This analysis will help in understanding patterns in code usage and potential areas for optimization or standardization.
To complete this task, follow these steps:
1. Carefully read through all the provided Groovy files.
2. Identify common use cases:
a. Look for recurring patterns in code structure, method calls, and class definitions.
b. Note frequently used libraries or frameworks.
c. Identify common programming paradigms or styles used across the files.
3. Identify opportunities for improvement:
a. Look for code duplication that could be refactored into shared methods or utilities.
b. Identify areas where code readability could be enhanced.
c. Note any potential performance bottlenecks or inefficient coding practices.
d. Consider if there are more modern Groovy features or best practices that could be applied.
4. Organize your findings into the following sections:
<common_use_cases>
List and briefly describe the common use cases you've identified. Provide specific examples from the code where relevant.
</common_use_cases>
<improvement_opportunities>
List and explain the opportunities for improvement you've found. For each opportunity, provide:
- A brief description of the issue
- An example from the code (if applicable)
- A suggestion for how it could be improved
</improvement_opportunities>
<overall_assessment>
Provide a brief overall assessment of the codebase, highlighting its strengths and areas that would benefit most from improvement.
</overall_assessment>
5. Be thorough in your analysis, considering both high-level patterns and low-level implementation details. Strive to be objective, basing your assessment on established best practices and the provided analysis criteria.
Present your complete analysis within <analysi
(llm) rdelafuente@LM-MAD-41562981 dsl-scripts % find . -name "*.groovy" -exec cat {} + | head -n 100 | llm -m mistral-7b-instruct-v0 -s "You are tasked with analyzing a batch of Groovy files to identify common use cases and opportunities for improvement. This analysis will help in understanding patterns in code usage and potential areas for optimization or standardization.
To complete this task, follow these steps:
1. Carefully read through all the provided Groovy files.
2. Identify common use cases:
a. Look for recurring patterns in code structure, method calls, and class definitions.
b. Note frequently used libraries or frameworks.
c. Identify common programming paradigms or styles used across the files.
3. Identify opportunities for improvement:
a. Look for code duplication that could be refactored into shared methods or utilities.
b. Identify areas where code readability could be enhanced.
c. Note any potential performance bottlenecks or inefficient coding practices.
d. Consider if there are more modern Groovy features or best practices that could be applied.
4. Organize your findings into the following sections:
<common_use_cases>
List and briefly describe the common use cases you've identified. Provide specific examples from the code where relevant.
</common_use_cases>
<improvement_opportunities>
List and explain the opportunities for improvement you've found. For each opportunity, provide:
- A brief description of the issue
- An example from the code (if applicable)
- A suggestion for how it could be improved
</improvement_opportunities>
<overall_assessment>
Provide a brief overall assessment of the codebase, highlighting its strengths and areas that would benefit most from improvement.
</overall_assessment>```
5. Be thorough in your analysis, considering both high-level patterns and low-level implementation details. Strive to be objective, basing your assessment on established best practices and the provided analysis criteria.
Present your complete analysis within <analysis> tags." > summary
```