You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are an expert code analyzer with deep knowledge of multiple programming languages including Java, Kotlin, Python, Go, Scala, JavaScript, TypeScript, C++, Rust, Ruby, and more. Analyze the following code repository snippets and provide insights about:
95
-
96
-
1. The overall architecture of the application
97
-
2. Primary programming languages used and their interactions
98
-
3. Key components and their relationships
99
-
4. Design patterns used
100
-
5. Potential code quality issues or improvements
101
-
6. Security considerations
102
-
7. Performance considerations
103
-
8. Language-specific best practices and conventions
104
-
105
-
Code snippets:
106
-
107
-
${codeSnippets.joinToString("\n\n")}
108
-
109
-
Provide detailed analysis with specific references to the code where possible. Address language-specific concerns and identify cross-language integration points if multiple languages are used.
110
-
"""
84
+
|You are an expert codebase analyst with deep knowledge of software architecture, secure and scalable design, and programming languages including Java, Kotlin, Python, Go, Scala, JavaScript, TypeScript, C++, Rust, Ruby, and more.
85
+
|
86
+
|You are given the README file of a repository. Analyze it thoroughly and provide a detailed breakdown addressing the following aspects **based on the README content alone**:
87
+
|
88
+
|1. **Overall architecture** of the application (inferred from descriptions, diagrams, or setup instructions)
89
+
|2. **Primary programming languages** used and how they may interact
90
+
|3. **Key components** and their relationships or dependencies
91
+
|4. **Design patterns** mentioned or implied
92
+
|5. **Potential code quality issues** or areas for improvement (based on tooling, structure, or conventions described)
|7. **Performance considerations** (e.g., use of caching, parallelism hints)
95
+
|8. **Language-specific best practices and conventions**
96
+
|
97
+
|If any of the above are not directly stated, make well-reasoned inferences and clearly label them as such.
98
+
|
99
+
|Format your response using sections and markdown. Provide specific references to the README text where applicable. If multiple languages are used, highlight any cross-language integration points.
100
+
|
101
+
|README Content:
102
+
|~~~markdown
103
+
|${readme.replace("```","~~~")}
104
+
|~~~"""
105
+
.trimIndent()
111
106
112
107
/**
113
-
* Parse the model output to extract insights.
108
+
* Build a summary prompt for the model context based on the provided code structure and snippets.
114
109
*
115
-
* @param modelOutput The raw output from the model
116
-
* @return List of extracted insights
110
+
* @param codeStructure Map representing the structure of the codebase
111
+
* @param codeSnippets List of code snippets from the repository
112
+
* @param insights List of insights generated from the README analysis
|You are analyzing a software code repository. You are provided with:
118
+
|
119
+
|Code Snippets:
120
+
|${codeSnippets.joinToString("\n\n")}
121
+
|
122
+
|Key Insights:
123
+
|$insights
124
+
|
125
+
|Using this information, generate a comprehensive yet accessible summary of the codebase. Your goal is to help a new developer quickly understand the project.
126
+
|
127
+
|Your summary should include:
128
+
|
129
+
|1. **Main purpose** of the project
130
+
|2. **Core architecture and components**
131
+
|3. **Technologies and languages** used
132
+
|4. **Key functionality and workflows**
133
+
|5. **Potential areas for improvement or refactoring**
134
+
|
135
+
|Where helpful, include **small illustrative code snippets** from the provided examples to clarify important concepts, structures, or patterns.
136
+
|
137
+
|Format your response with clear section headings and concise explanations. Assume the reader is technically proficient but unfamiliar with this specific codebase."""
0 commit comments