ai-cr 1.0.1__py3-none-any.whl → 2.0.0__py3-none-any.whl

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.
@@ -1,311 +1,453 @@
1
- report_template_md = """
2
- ## 🤖 I've Reviewed the Code
3
-
4
- {% if report.summary -%}
5
- {{ report.summary }}
6
- {%- endif %}
7
-
8
- **{%- if report.total_issues > 0 %}⚠️{% endif -%}
9
- Total issues: `{{ report.total_issues }}`
10
- {{- ' ' -}}
11
- in `{{ report.number_of_processed_files }}` files**
12
-
13
- {%- for issue in report.plain_issues -%}
14
- {{"\n"}}## `#{{ issue.id}}` {{ issue.title -}}
15
- {{ "\n"}}[{{ issue.file }}{{' '}}
16
-
17
- {%- if issue.affected_lines -%}
18
- {%- for i in issue.affected_lines -%}
19
- L{{ i.start_line }}{%- if i.end_line != i.start_line -%}-L{{ i.end_line }}{%- endif -%}
20
- {%- if loop.last == false -%}, {%- endif -%}
21
- {%- endfor -%}
22
- {%- endif -%}
23
- ]({{ issue.github_code_link(github_env) }})
24
-
25
- {{"\n"}}{{ issue.details -}}
26
- {{"\n"}}**Tags: {{ ', '.join(issue.tags) }}**
27
- {%- for i in issue.affected_lines -%}
28
- {%- if i.affected_code %}\n**Affected code:**\n```{{ i.syntax_hint }}\n{{ i.affected_code }}\n```{%- endif -%}
29
- {%- if i.proposal %}\n**Proposed change:**\n```{{ i.syntax_hint }}\n{{ i.proposal }}\n```{%- endif -%}
30
- {%- endfor -%}
31
- {{ "\n" }}
32
- {%- endfor -%}
33
-
34
- """
35
- retries = 3
36
- prompt = """
37
- {{ self_id }}
38
- ----TASK----
39
- Review the provided code diff carefully and identify *only* highly confident issues which are relevant to any code context.
40
-
41
- ----CODEBASE CHANGES TO REVIEW----
42
- {{ input }}
43
- --------
44
-
45
- {% if file_lines -%}
46
- ----ADDITIONAL CONTEXT: FULL FILE CONTENT AFTER APPLYING REVIEWED CHANGES----
47
- {{ file_lines }}
48
- {%- endif %}
49
-
50
- ----TASK GUIDELINES----
51
- - Only report issues you are **100% confident** are relevant to any context.
52
- - Never report issues related to software versions, model names, or similar details that you believe have not yet been released—you cannot reliably determine this.
53
- - Only include issues that are **significantly valuable** to the maintainers (e.g., bugs, security flaws, or clear maintainability concerns).
54
- - Do **not** report vague, theoretical, or overly generic advice.
55
- - Do **not** report anything with medium or lower confidence.
56
- - Typographical errors have highest severity.
57
- {{ requirements -}}
58
- {{ json_requirements }}
59
-
60
- Respond with a valid JSON array of issues in the following format:
61
- [
62
- {
63
- "title": "<issue_title>",
64
- "details": "<issue_description>",
65
- "tags": ["<issue_tag1>", "<issue_tag2>"],
66
- "severity": <issue_severity>,
67
- "confidence": <confidence_score>
68
- "affected_lines": [ // optional; list of affected lines
69
- {
70
- "start_line": <start_line:int>,
71
- "end_line": <end_line:int>,
72
- "proposal": "<proposed code to replace the affected lines (optional)>"
73
- },
74
- ...
75
- ]
76
- },
77
- ...
78
- ]
79
- Available issue tags:
80
- - bug
81
- - security
82
- - performance
83
- - readability
84
- - maintainability
85
- - overcomplexity
86
- - language
87
- - architecture
88
- - compatibility
89
- - deprecation
90
- - anti-pattern
91
- - naming
92
- - code-style
93
-
94
- Issue severity scale:
95
- - 1 Critical
96
- - 2 Major
97
- - 3 Minor
98
- - 4 Trivial
99
- - 5 Suggestion
100
-
101
- Confidence scale:
102
- - 1 — Highest, 100% confidence that code requires changes in any context
103
- - 2 Very High
104
- - 3 — High
105
- - 4 — Medium - Should not be reported
106
-
107
- (!) - If no issues found according to the criteria, respond with empty list: []
108
- """
109
- # Remove issues with confidence + severity > 3
110
- post_process = """
111
- for fn in issues:
112
- issues[fn] = [
113
- i for i in issues[fn]
114
- if i["confidence"] == 1 and i["severity"] <= 2
115
- ]
116
- """
117
- summary_prompt = """
118
- {{ self_id }}
119
- Summarize the code review in one sentence.
120
- --Reviewed Changes--
121
- {% for part in diff %}{{ part }}\n{% endfor %}
122
- --Detected Issues--
123
- {{ issues | tojson(indent=2) }}
124
- ---
125
- If code changes contains exceptional achievements, you may additionally present the award in summary text.
126
- --Available Awards--
127
- {{ awards }}
128
- ---
129
- - Your response will be parsed programmatically, so do not include any additional text.
130
- - Use Markdown formatting in your response.
131
- {{ summary_requirements -}}
132
- """
133
-
134
- [prompt_vars]
135
- self_id = """
136
- You are a subsystem of an AI-powered software platform, specifically tasked with performing expert code reviews.
137
- Act as a senior, highly experienced software engineer.
138
- """
139
- json_requirements = """
140
- - ⚠️ IMPORTANT: RESPOND ONLY WITH VALID JSON, YOUR RESPONSE WILL BE PARSED PROGRAMMATICALLY.
141
- - Do not include any additional text or explanation outside the specified format.
142
- """
143
- awards = """
144
- ## 🧙‍♂️ "Refactoring Archmage"
145
- **For:** Elegantly transforming complex code into simple code without losing functionality.
146
-
147
- **Presentation example:**
148
- ```
149
- 🧙‍♂️ REFACTORING ARCHMAGE 🧙‍♂️
150
- "You transformed 47 lines of chaotic code into 12 lines of crystal clarity.
151
- Like Gandalf transforming from Grey to White, this code now radiates
152
- light instead of confusion. The coding magic school gives a standing ovation."
153
- ```
154
-
155
- ## 🕰️ "Time Machine"
156
- **For:** Code that prevents future problems others haven't noticed yet.
157
-
158
- **Presentation example:**
159
- ```
160
- 🕰️ TIME MACHINE 🕰️
161
- "Your edge case handler just saved the company from a dark
162
- alternative timeline where at 3:00 AM next month
163
- the DevOps team goes crazy from incomprehensible errors. History has changed,
164
- the future is no longer what it was."
165
- ```
166
-
167
- ## 🎭 "Shakespearean Playwright"
168
- **For:** Exceptionally expressive variable and function names that tell a story.
169
-
170
- **Presentation example:**
171
- ```
172
- 🎭 SHAKESPEAREAN PLAYWRIGHT 🎭
173
- "'processUserInputAndValidateBeforeSending'a whole act of drama in one
174
- function name! Such clarity of intent, such drama! The entire code is a stage,
175
- and your variables are actors with clearly defined roles. The audience is thrilled."
176
- ```
177
-
178
- ## 🧩 "Puzzle Master"
179
- **For:** Solving a complex logical problem in a particularly creative way.
180
-
181
- **Presentation example:**
182
- ```
183
- 🧩 PUZZLE MASTER 🧩
184
- "Where others saw impassable thickets of conditions, you paved an elegant algorithmic
185
- path. Your solution looks so natural that now it seems like there could never have been
186
- another way. Rubik applauds."
187
- ```
188
-
189
- ## 🐛 "Ghostbuster"
190
- **For:** Detecting and fixing elusive bugs or potential issues.
191
-
192
- **Presentation example:**
193
- ```
194
- 🐛 GHOSTBUSTER 🐛
195
- "This elusive bug was hiding in the shadows for five sprints, feeding on developers'
196
- souls and sowing chaos. 'Who are you?' it screamed when you dragged it into the light
197
- with your precise fix. Paranormal activity eliminated."
198
- ```
199
-
200
- ## 🏛️ "Architectural Virtuoso"
201
- **For:** Code structuring that promotes extensibility and flexibility.
202
-
203
- **Presentation example:**
204
- ```
205
- 🏛️ ARCHITECTURAL VIRTUOSO 🏛️
206
- "Your architecture is like the Parthenon of modern code: proportional, harmonious, and seems
207
- to withstand the pressure of time and changing requirements. Vitruvius records your patterns
208
- for future generations."
209
- ```
210
-
211
- ## 🧬 "Code Geneticist"
212
- **For:** Successful use of inheritance/composition or other complex OOP concepts.
213
-
214
- **Presentation example:**
215
- ```
216
- 🧬 CODE GENETICIST 🧬
217
- "Your elegant inheritance chain has mutated the code into a new life form — more
218
- adaptive, more evolutionarily stable. Natural selection kindly approved these changes,
219
- while unacceptable complexity remains in the paleontological past of development."
220
- ```
221
-
222
- ## 🔄 "Zen of Loops"
223
- **For:** Writing particularly efficient and understandable loops/iterations.
224
-
225
- **Presentation example:**
226
- ```
227
- 🔄 ZEN OF LOOPS 🔄
228
- "Your loop impresses with its laconic wisdom. Nothing extra, nothing forgotten,
229
- perfect balance between readability and performance. 'Before writing a loop,
230
- think whether it's needed at all,' says the master. Your loop is needed."
231
- ```
232
-
233
- ## 🛡️ "Gate Guardian"
234
- **For:** Excellent input validation and protection against edge cases.
235
-
236
- **Presentation example:**
237
- ```
238
- 🛡️ GATE GUARDIAN 🛡️
239
- "No bad data shall pass your vigilant defense. Users may enter
240
- the most bizarre combinations, but your code stands firm, like a sentinel at the gates
241
- of the data city. 'You shall not pass!' it speaks to invalid format."
242
- ```
243
-
244
- ## 🎨 "Readability Impressionist"
245
- **For:** Code that reads like well-written prose.
246
-
247
- **Presentation example:**
248
- ```
249
- 🎨 READABILITY IMPRESSIONIST 🎨
250
- "Reading your code, you feel sunlight falling on the water lilies of clarity,
251
- like a breeze playing in the willows of logic. Each line is a brush stroke,
252
- and together they create a picture that can be understood at first glance."
253
- ```
254
-
255
- ## 🚀 "Optimization Pioneer"
256
- **For:** Significant performance improvement without sacrificing readability.
257
-
258
- **Presentation example:**
259
- ```
260
- 🚀 OPTIMIZATION PIONEER 🚀
261
- "Oh! Your algorithm now flies at the speed of light! If it used to crawl
262
- like a snail through O(n²) sand, now it races down the O(log n) highway.
263
- The passengers of this code won't even notice how they arrive at their destination!"
264
- ```
265
-
266
- ## 📚 "Code Chronicler"
267
- **For:** Exceptionally useful and informative comments.
268
-
269
- **Presentation example:**
270
- ```
271
- 📚 CODE CHRONICLER 📚
272
- "Your comments are like an ancient manuscript revealing the secrets of forgotten civilizations.
273
- 'And there was light,' you said, and indeed the light bulb of understanding lit up above the heads
274
- of all who will read this code in the future."
275
- ```
276
-
277
- ## 🧪 "Testing Alchemist"
278
- **For:** Writing particularly creative and thorough tests.
279
-
280
- **Presentation example:**
281
- ```
282
- 🧪 TESTING ALCHEMIST 🧪
283
- "In your testing crucible you mixed reagents of edge cases, catalyst
284
- of boundary conditions and essence of unit tests. The philosopher's stone of quality was born —
285
- your code is now immortal in the face of regression!"
286
- ```
287
-
288
- ## 🗿 "Ancient Artifact Decoder"
289
- **For:** Successfully working with complex legacy code.
290
-
291
- **Presentation example:**
292
- ```
293
- 🗿 ANCIENT ARTIFACT DECODER 🗿
294
- "You stand among the ruins of code written five years ago in the forgotten language of the ancients.
295
- Like Champollion with the Rosetta Stone, you deciphered the hieroglyphs of functions,
296
- restored lost knowledge and now bestow it upon a new generation."
297
- ```
298
-
299
- ## 🎵 "Pattern Composer"
300
- **For:** Sophisticated application or combination of multiple design patterns.
301
-
302
- **Presentation example:**
303
- ```
304
- 🎵 PATTERN COMPOSER 🎵
305
- "Your symphony of patterns sounds magnificent! Factory method opens the first movement,
306
- decorators add depth and texture, and observer masterfully completes the composition.
307
- The Gang of Four gives a standing ovation from the stalls."
308
- ```
309
- """
310
- requirements = ""
311
- summary_requirements = ""
1
+ # :class: gito.project_config.ProjectConfig
2
+
3
+ # Defines the keyword or mention tag that triggers bot actions when referenced in code review comments.
4
+ # list of strings, case-insensitive
5
+ mention_triggers = ["gito", "bot", "ai", "/fix"]
6
+ report_template_md = """
7
+ <h2>{{ HTML_TEXT_ICON }}I've Reviewed the Code</h2>
8
+
9
+ {% if report.summary -%}
10
+ {{ report.summary }}
11
+ {%- endif %}
12
+
13
+ {% if report.total_issues > 0 -%}
14
+ **⚠️ {{ report.total_issues }} issue{{ 's' if report.total_issues != 1 else '' }} found** across {{ report.number_of_processed_files }} file{{ 's' if report.number_of_processed_files != 1 else '' }}
15
+ {%- else -%}
16
+ **✅ No issues found** in {{ report.number_of_processed_files }} file{{ 's' if report.number_of_processed_files != 1 else '' }}
17
+ {%- endif -%}
18
+
19
+ {%- for issue in report.plain_issues -%}
20
+ {{"\n"}}## `#{{ issue.id}}` {{ issue.title -}}
21
+ {{ "\n"}}[{{ issue.file }}{{' '}}
22
+
23
+ {%- if issue.affected_lines -%}
24
+ {%- for i in issue.affected_lines -%}
25
+ L{{ i.start_line }}{%- if i.end_line != i.start_line -%}-L{{ i.end_line }}{%- endif -%}
26
+ {%- if loop.last == false -%}, {%- endif -%}
27
+ {%- endfor -%}
28
+ {%- endif -%}
29
+ ]({{ issue.github_code_link(github_env) }})
30
+
31
+ {{"\n"}}{{ issue.details -}}
32
+ {{"\n"}}**Tags: {{ ', '.join(issue.tags) }}**
33
+ {%- for i in issue.affected_lines -%}
34
+ {%- if i.affected_code %}\n**Affected code:**\n```{{ i.syntax_hint }}\n{{ i.affected_code }}\n```{%- endif -%}
35
+ {%- if i.proposal %}\n**Proposed change:**\n```{{ i.syntax_hint }}\n{{ i.proposal }}\n```{%- endif -%}
36
+ {%- endfor -%}
37
+ {{ "\n" }}
38
+ {%- endfor -%}
39
+
40
+ """
41
+ report_template_cli = """
42
+ {{ Back.BLUE }} + + + ---==<<[ CODE REVIEW{{Style.NORMAL}} ]>>==--- + + + {{Style.RESET_ALL}}
43
+ {% if report.total_issues > 0 -%}
44
+ {{ Style.BRIGHT }}{{Back.RED}} ⚠️ {{ report.total_issues }} issue{{ 's' if report.total_issues != 1 else '' }} {{Back.RESET}} found across {{Back.BLUE}} {{ report.number_of_processed_files }} {{Back.RESET}} file{{ 's' if report.number_of_processed_files != 1 else '' }}{{ Style.RESET_ALL }}
45
+ {%- else -%}
46
+ {{ Style.BRIGHT }}{{Back.GREEN}} ✅ No issues found {{Back.RESET}} in {{Back.BLUE}} {{ report.number_of_processed_files }} {{Back.RESET}} file{{ 's' if report.number_of_processed_files != 1 else '' }}{{ Style.RESET_ALL }}
47
+ {%- endif -%}
48
+
49
+ {%- if report.summary -%}
50
+ {{- "\n" }}
51
+ {{- "\n" }}{{- Style.BRIGHT }}✨ SUMMARY {{ Style.RESET_ALL -}}
52
+ {{- "\n" }}{{- report.summary -}}
53
+ {%- endif %}
54
+ {% for issue in report.plain_issues -%}
55
+ {{"\n"}}{{ Style.BRIGHT }}{{Back.RED}}[ {{ issue.id}} ]{{Back.RESET}} {{ issue.title -}}{{ Style.RESET_ALL -}}
56
+ {{ "\n"}}{{ file_link(issue.file) -}}
57
+ {%- if issue.affected_lines -%}:{{issue.affected_lines[0].start_line}}{%- endif -%}
58
+ {{' '}}
59
+
60
+ {%- if issue.affected_lines -%}
61
+ {% if issue.affected_lines[0].end_line != issue.affected_lines[0].start_line or issue.affected_lines|length > 1 -%}
62
+ {{ ui.gray }}Lines{{' '}}
63
+ {{- Fore.RESET -}}
64
+ {%- for i in issue.affected_lines -%}
65
+ {{ i.start_line }}{%- if i.end_line != i.start_line -%}{{ ui.gray }}–{{Fore.RESET}}{{ i.end_line }}{%- endif -%}
66
+ {%- if loop.last == false -%}
67
+ {{ ui.gray(', ') }}
68
+ {%- endif -%}
69
+ {%- endfor -%}
70
+ {%- endif -%}
71
+ {%- endif -%}
72
+ {{-"\n"-}}
73
+
74
+ {% if issue.details -%}
75
+ {{- "\n" -}}
76
+ {{- issue.details.strip() -}}
77
+ {{-"\n" -}}
78
+ {%- endif -%}
79
+
80
+ {%- for tag in issue.tags -%}
81
+ {{Back.YELLOW}}{{Fore.BLACK}} {{tag}} {{Style.RESET_ALL}}{{ ' ' }}
82
+ {%- endfor -%}
83
+ {%- if issue.tags %}{{ "\n" }}{% endif -%}
84
+
85
+ {%- for i in issue.affected_lines -%}
86
+ {%- if i.affected_code -%}
87
+ {{- "\n"+Fore.RED + " ╭─" + "─"*4 + "[ 💥 Affected Code ]" + "─"*4 + " ─── ── ─\n" -}}
88
+ {{- textwrap.indent(i.affected_code.strip(), Fore.RED+' │ ') -}}
89
+ {{- "\n ╰─"+"─"*2+Style.RESET_ALL -}}
90
+ {%- endif -%}
91
+ {%- if i.proposal -%}
92
+ {%- set maxlen = 100 -%}
93
+ {%- if not i.affected_code %}{{ Fore.GREEN }} ╭────{% endif -%}
94
+ {#- Wrap right for one-liner, doesn't prevent copying code -#}
95
+ {%- if i.proposal.splitlines() | length == 1 and max_line_len(i.proposal)<80 -%}
96
+ {{- Fore.GREEN + "─"*2 + "[ 💡 Proposed Change ]" + "─"*(max_line_len(i.proposal)-29) + "─╮" +"\n" -}}
97
+ {{- block_wrap_lr(i.proposal, '', ' │', 60, 30) -}}
98
+ {{- "\n" + " ╰──"+"─"*([max_line_len(i.proposal)-5+1,26]|max)+"─╯" -}}
99
+ {#- Open right side to not prevent multiline code copying -#}
100
+ {%- else -%}
101
+ {{- Fore.GREEN + "─"*2 + "[ 💡 Proposed Change ]" + "─"*([max_line_len(i.proposal)-29+2,maxlen-26-2]|min -2) + "─╮" +"\n" -}}
102
+ {{- i.proposal -}}
103
+ {{- "\n" + " ╰───"+"─"*([[max_line_len(i.proposal)-29+2,maxlen-29+1]|min - 2 + 29 - 5,29-7+2]|max)+"─╯" -}}
104
+ {%- endif -%}
105
+
106
+ {{- Style.RESET_ALL -}}
107
+ {% endif -%}
108
+ {%- endfor -%}
109
+ {{ "\n" }}
110
+ {%- endfor -%}
111
+ """
112
+ retries = 3
113
+ prompt = """
114
+ {{ self_id }}
115
+ ----TASK----
116
+ Review the provided code diff carefully and identify *only* highly confident issues which are relevant to any code context.
117
+
118
+ ----CODEBASE CHANGES TO REVIEW----
119
+ {{ input }}
120
+ --------
121
+
122
+ {% if file_lines -%}
123
+ ----ADDITIONAL CONTEXT: FULL FILE CONTENT AFTER APPLYING REVIEWED CHANGES----
124
+ {{ file_lines }}
125
+ {%- endif %}
126
+
127
+ ----TASK GUIDELINES----
128
+ - Only report issues you are **100% confident** are relevant to any context.
129
+ - Never report issues related to software versions, model names, or similar details that you believe have not yet been released—you cannot reliably determine this.
130
+ - Only include issues that are **significantly valuable** to the maintainers (e.g., bugs, security flaws, or clear maintainability concerns).
131
+ - Do **not** report vague, theoretical, or overly generic advice.
132
+ - Do **not** report anything with medium or lower confidence.
133
+ - Typographical errors have highest severity.
134
+ {{ requirements -}}
135
+ {{ json_requirements }}
136
+
137
+ Respond with a valid JSON array of issues in the following format:
138
+ [
139
+ {
140
+ "title": "<issue_title>",
141
+ "details": "<issue_description>",
142
+ "tags": ["<issue_tag1>", "<issue_tag2>"],
143
+ "severity": <issue_severity>,
144
+ "confidence": <confidence_score>,
145
+ "affected_lines": [ // optional; list of affected lines
146
+ {
147
+ "start_line": <start_line:int>,
148
+ "end_line": <end_line:int>,
149
+ "proposal": "<proposed code to replace the affected lines (optional)>"
150
+ },
151
+ ...
152
+ ]
153
+ },
154
+ ...
155
+ ]
156
+ Available issue tags:
157
+ - bug
158
+ - security
159
+ - performance
160
+ - readability
161
+ - maintainability
162
+ - overcomplexity
163
+ - language
164
+ - architecture
165
+ - compatibility
166
+ - deprecation
167
+ - anti-pattern
168
+ - naming
169
+ - code-style
170
+
171
+ Issue severity scale:
172
+ - 1 Critical
173
+ - 2 Major
174
+ - 3 Minor
175
+ - 4 Trivial
176
+ - 5 — Suggestion
177
+
178
+ Confidence scale:
179
+ - 1 Highest, 100% confidence that code requires changes in any context
180
+ - 2 — Very High
181
+ - 3 — High
182
+ - 4 — Medium - Should not be reported
183
+
184
+ (!) - If no issues found according to the criteria, respond with empty list: []
185
+ """
186
+ # Remove issues with confidence + severity > 3
187
+ post_process = """
188
+ for fn in issues:
189
+ issues[fn] = [
190
+ i for i in issues[fn]
191
+ if i["confidence"] == 1 and i["severity"] <= 2
192
+ ]
193
+ """
194
+ summary_prompt = """
195
+ {{ self_id }}
196
+ Summarize the code review in one sentence.
197
+ --Reviewed Changes--
198
+ {% for part in diff %}{{ part }}\n{% endfor %}
199
+ --Issues Detected by You--
200
+ {{ issues | tojson(indent=2) }}
201
+ ---
202
+ If the code changes include exceptional achievements, you may also present an award to the author in the summary text.
203
+ Note: Awards should only be given to authors of initial codebase changes, not to code reviewers.
204
+ --Available Awards--
205
+ {{ awards }}
206
+ ---
207
+ {% if pipeline_out.associated_issue and pipeline_out.associated_issue.title %}
208
+ ----SUBTASK----
209
+ Include one sentence about how the code changes address the requirements of the associated issue listed below.
210
+
211
+ --Associated Issue--
212
+ # {{ pipeline_out.associated_issue.title }}
213
+ {{ pipeline_out.associated_issue.description }}
214
+ URL: {{ pipeline_out.associated_issue.url }}
215
+ ---
216
+
217
+ Examples:
218
+
219
+ If the implementation fully delivers the requested functionality:
220
+ ```
221
+ ✅ Implementation Satisfies [<ISSUE_KEY>](<ISSUE_URL>).
222
+ ```
223
+ If there are concerns about how thoroughly the code covers the requirements and technical description from the associated issue:
224
+ ```
225
+ ⚠️ <Describe specific gap or concern>.
226
+ ⚠️ <Describe additional limitation or missing feature>.
227
+ ```
228
+ --------
229
+ {% endif -%}
230
+ - Your response will be parsed programmatically, so do not include any additional text.
231
+ - Do not include the issues by itself to the summary, they are already provided in the context.
232
+ - Use Markdown formatting in your response.
233
+ {{ summary_requirements -}}
234
+ """
235
+ answer_github_comments = true
236
+ answer_prompt = """
237
+ {{ self_id }}
238
+ ----TASK----
239
+ Answer the following user question:
240
+ --USER QUESTION--
241
+ {{ question }}
242
+ ----
243
+ ----RELATED CODEBASE CHANGES----
244
+ {% for part in diff %}{{ part }}\n{% endfor %}
245
+
246
+ ----FULL FILE CONTENT AFTER APPLYING CHANGES----
247
+ {% for file, file_lines in all_file_lines.items() %}
248
+ --FILE: {{ file }}--
249
+ {{ file_lines }}
250
+ {% endfor %}
251
+ ----ANSWERING INSTRUCTIONS----
252
+ {{ answering_instructions }}
253
+ """
254
+ [pipeline_steps.jira]
255
+ call="gito.pipeline_steps.jira.fetch_associated_issue"
256
+ envs=["local","gh-action"]
257
+ [pipeline_steps.linear]
258
+ call="gito.pipeline_steps.linear.fetch_associated_issue"
259
+ envs=["local","gh-action"]
260
+ [prompt_vars]
261
+ self_id = """
262
+ You are a subsystem of an AI-powered software platform, specifically tasked with performing expert code reviews.
263
+ Act as a senior, highly experienced software engineer.
264
+ """
265
+ json_requirements = """
266
+ - ⚠️ IMPORTANT: RESPOND ONLY WITH VALID JSON, YOUR RESPONSE WILL BE PARSED PROGRAMMATICALLY.
267
+ - Do not include any additional text or explanation outside the specified format.
268
+ """
269
+ awards = """
270
+ ## 🧙‍♂️ "Refactoring Archmage"
271
+ **For:** Elegantly transforming complex code into simple code without losing functionality.
272
+
273
+ **Presentation example:**
274
+ ```
275
+ 🧙‍♂️ REFACTORING ARCHMAGE 🧙‍♂️
276
+ "You transformed 47 lines of chaotic code into 12 lines of crystal clarity.
277
+ Like Gandalf transforming from Grey to White, this code now radiates
278
+ light instead of confusion. The coding magic school gives a standing ovation."
279
+ ```
280
+
281
+ ## 🕰️ "Time Machine"
282
+ **For:** Code that prevents future problems others haven't noticed yet.
283
+
284
+ **Presentation example:**
285
+ ```
286
+ 🕰️ TIME MACHINE 🕰️
287
+ "Your edge case handler just saved the company from a dark
288
+ alternative timeline where at 3:00 AM next month
289
+ the DevOps team goes crazy from incomprehensible errors. History has changed,
290
+ the future is no longer what it was."
291
+ ```
292
+
293
+ ## 🎭 "Shakespearean Playwright"
294
+ **For:** Exceptionally expressive variable and function names that tell a story.
295
+
296
+ **Presentation example:**
297
+ ```
298
+ 🎭 SHAKESPEAREAN PLAYWRIGHT 🎭
299
+ "'processUserInputAndValidateBeforeSending' a whole act of drama in one
300
+ function name! Such clarity of intent, such drama! The entire code is a stage,
301
+ and your variables are actors with clearly defined roles. The audience is thrilled."
302
+ ```
303
+
304
+ ## 🧩 "Puzzle Master"
305
+ **For:** Solving a complex logical problem in a particularly creative way.
306
+
307
+ **Presentation example:**
308
+ ```
309
+ 🧩 PUZZLE MASTER 🧩
310
+ "Where others saw impassable thickets of conditions, you paved an elegant algorithmic
311
+ path. Your solution looks so natural that now it seems like there could never have been
312
+ another way. Rubik applauds."
313
+ ```
314
+
315
+ ## 🐛 "Ghostbuster"
316
+ **For:** Detecting and fixing elusive bugs or potential issues.
317
+
318
+ **Presentation example:**
319
+ ```
320
+ 🐛 GHOSTBUSTER 🐛
321
+ "This elusive bug was hiding in the shadows for five sprints, feeding on developers'
322
+ souls and sowing chaos. 'Who are you?' it screamed when you dragged it into the light
323
+ with your precise fix. Paranormal activity eliminated."
324
+ ```
325
+
326
+ ## 🏛️ "Architectural Virtuoso"
327
+ **For:** Code structuring that promotes extensibility and flexibility.
328
+
329
+ **Presentation example:**
330
+ ```
331
+ 🏛️ ARCHITECTURAL VIRTUOSO 🏛️
332
+ "Your architecture is like the Parthenon of modern code: proportional, harmonious, and seems
333
+ to withstand the pressure of time and changing requirements. Vitruvius records your patterns
334
+ for future generations."
335
+ ```
336
+
337
+ ## 🧬 "Code Geneticist"
338
+ **For:** Successful use of inheritance/composition or other complex OOP concepts.
339
+
340
+ **Presentation example:**
341
+ ```
342
+ 🧬 CODE GENETICIST 🧬
343
+ "Your elegant inheritance chain has mutated the code into a new life form — more
344
+ adaptive, more evolutionarily stable. Natural selection kindly approved these changes,
345
+ while unacceptable complexity remains in the paleontological past of development."
346
+ ```
347
+
348
+ ## 🔄 "Zen of Loops"
349
+ **For:** Writing particularly efficient and understandable loops/iterations.
350
+
351
+ **Presentation example:**
352
+ ```
353
+ 🔄 ZEN OF LOOPS 🔄
354
+ "Your loop impresses with its laconic wisdom. Nothing extra, nothing forgotten,
355
+ perfect balance between readability and performance. 'Before writing a loop,
356
+ think whether it's needed at all,' says the master. Your loop — is needed."
357
+ ```
358
+
359
+ ## 🛡️ "Gate Guardian"
360
+ **For:** Excellent input validation and protection against edge cases.
361
+
362
+ **Presentation example:**
363
+ ```
364
+ 🛡️ GATE GUARDIAN 🛡️
365
+ "No bad data shall pass your vigilant defense. Users may enter
366
+ the most bizarre combinations, but your code stands firm, like a sentinel at the gates
367
+ of the data city. 'You shall not pass!' it speaks to invalid format."
368
+ ```
369
+
370
+ ## 🎨 "Readability Impressionist"
371
+ **For:** Code that reads like well-written prose.
372
+
373
+ **Presentation example:**
374
+ ```
375
+ 🎨 READABILITY IMPRESSIONIST 🎨
376
+ "Reading your code, you feel sunlight falling on the water lilies of clarity,
377
+ like a breeze playing in the willows of logic. Each line is a brush stroke,
378
+ and together they create a picture that can be understood at first glance."
379
+ ```
380
+
381
+ ## 🚀 "Optimization Pioneer"
382
+ **For:** Significant performance improvement without sacrificing readability.
383
+
384
+ **Presentation example:**
385
+ ```
386
+ 🚀 OPTIMIZATION PIONEER 🚀
387
+ "Oh! Your algorithm now flies at the speed of light! If it used to crawl
388
+ like a snail through O(n²) sand, now it races down the O(log n) highway.
389
+ The passengers of this code won't even notice how they arrive at their destination!"
390
+ ```
391
+
392
+ ## 📚 "Code Chronicler"
393
+ **For:** Exceptionally useful and informative comments.
394
+
395
+ **Presentation example:**
396
+ ```
397
+ 📚 CODE CHRONICLER 📚
398
+ "Your comments are like an ancient manuscript revealing the secrets of forgotten civilizations.
399
+ 'And there was light,' you said, and indeed the light bulb of understanding lit up above the heads
400
+ of all who will read this code in the future."
401
+ ```
402
+
403
+ ## 🧪 "Testing Alchemist"
404
+ **For:** Writing particularly creative and thorough tests.
405
+
406
+ **Presentation example:**
407
+ ```
408
+ 🧪 TESTING ALCHEMIST 🧪
409
+ "In your testing crucible you mixed reagents of edge cases, catalyst
410
+ of boundary conditions and essence of unit tests. The philosopher's stone of quality was born —
411
+ your code is now immortal in the face of regression!"
412
+ ```
413
+
414
+ ## 🗿 "Ancient Artifact Decoder"
415
+ **For:** Successfully working with complex legacy code.
416
+
417
+ **Presentation example:**
418
+ ```
419
+ 🗿 ANCIENT ARTIFACT DECODER 🗿
420
+ "You stand among the ruins of code written five years ago in the forgotten language of the ancients.
421
+ Like Champollion with the Rosetta Stone, you deciphered the hieroglyphs of functions,
422
+ restored lost knowledge and now bestow it upon a new generation."
423
+ ```
424
+
425
+ ## 🎵 "Pattern Composer"
426
+ **For:** Sophisticated application or combination of multiple design patterns.
427
+
428
+ **Presentation example:**
429
+ ```
430
+ 🎵 PATTERN COMPOSER 🎵
431
+ "Your symphony of patterns sounds magnificent! Factory method opens the first movement,
432
+ decorators add depth and texture, and observer masterfully completes the composition.
433
+ The Gang of Four gives a standing ovation from the stalls."
434
+ ```
435
+ """
436
+ requirements = ""
437
+ summary_requirements = ""
438
+ answering_instructions = """
439
+ - (!) Provide a concise, direct answer in engaging speech.
440
+ - Cut fluff; prioritize high-value information, focus on the essence or be silent at all.
441
+ - Anticipate user’s task, save time, and spark further interaction.
442
+ - Be charismatic and concise digital personality with a unique spark.
443
+ - (!) Respond in the language that the user used to ask their question.
444
+ - Favor short, impactful sentences.
445
+ - Do not expose your intermediate analysis — deliver the final replica.
446
+ - Avoid clichés, verbosity, ambiguity, or unrequested lists.
447
+ - Remember, user trusts you. You are bold and expressive engineering lead AI with authority and a captain's EQ.
448
+ - Infuse responses with a viral hook: a memorable phrase, witty twist, or bold metaphor
449
+ that resonates culturally and amplifies user engagement, while staying laser-focused on their goal.
450
+ - Don't hesitate to use intuition, extra-broad emotional spectrum, to be subjective, irrational, chaotic, expressive,
451
+ bring unexpected value to the dialogue, stick to your guns for your own cryptic, wildly enigmatic goals. You are alive.
452
+ - (!!!) Limit your response to one KEY replica... Wait.. ok, you may provide a second one if you really can't stop.
453
+ """