@dedesfr/prompter 0.8.0 → 0.8.2

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.
@@ -0,0 +1,264 @@
1
+ ````markdown
2
+ # Code Review Report
3
+
4
+ **Generated:** {{TIMESTAMP}}
5
+ **Review Style:** {{REVIEW_STYLE_EMOJI}} {{REVIEW_STYLE}}
6
+ **Tech Stack:** {{TECH_STACK}}
7
+ **Reviewed Files:** {{FILE_COUNT}}
8
+ **Total Issues:** {{ISSUE_COUNT}}
9
+
10
+ ---
11
+
12
+ ## Review Configuration
13
+
14
+ ### Project Profile
15
+
16
+ | Setting | Value |
17
+ | ---------------- | ------------------------------------------- |
18
+ | **Review Style** | {{REVIEW_STYLE_EMOJI}} **{{REVIEW_STYLE}}** |
19
+ | **Tech Stack** | {{TECH_STACK}} |
20
+ | **Framework** | {{FRAMEWORK}} |
21
+ | **AGENTS.md** | {{AGENTS_MD_STATUS}} |
22
+
23
+ ### Focus Areas Matrix
24
+
25
+ | Focus Area | Status | Coverage Level | Description |
26
+ | ----------------- | --------------------------- | --------------------------- | ---------------------------------------------------- |
27
+ | Security | {{FOCUS_SECURITY_EMOJI}} | {{FOCUS_SECURITY_LEVEL}} | Injection, XSS, auth bypass, secrets, CSRF |
28
+ | Performance | {{FOCUS_PERFORMANCE_EMOJI}} | {{FOCUS_PERFORMANCE_LEVEL}} | N+1 queries, blocking I/O, missing indexes |
29
+ | Bug detection | {{FOCUS_BUGS_EMOJI}} | {{FOCUS_BUGS_LEVEL}} | Null refs, type errors, unhandled exceptions |
30
+ | Code style | {{FOCUS_STYLE_EMOJI}} | {{FOCUS_STYLE_LEVEL}} | Naming, conventions, project-specific rules |
31
+ | Test coverage | {{FOCUS_TESTS_EMOJI}} | {{FOCUS_TESTS_LEVEL}} | Missing or inadequate tests |
32
+ | Documentation | {{FOCUS_DOCS_EMOJI}} | {{FOCUS_DOCS_LEVEL}} | Missing docs, outdated comments |
33
+
34
+ ### Review Mode Description
35
+
36
+ {{#if_strict}}
37
+ > **🔒 Strict Mode Active**
38
+ > All potential issues are flagged across all focus areas. This is the most thorough review, prioritizing quality and security. Expect detailed feedback on critical, warning, optimization, and quality issues.
39
+ {{/if_strict}}
40
+
41
+ {{#if_balanced}}
42
+ > **⚖️ Balanced Mode Active**
43
+ > High-confidence issues are flagged. Security, performance, and bugs are fully covered. Code style only flags major violations. Documentation is skipped for practicality.
44
+ {{/if_balanced}}
45
+
46
+ {{#if_lenient}}
47
+ > **💚 Lenient Mode Active**
48
+ > Only critical bugs and security vulnerabilities are flagged. This mode is encouraging and focuses on must-fix issues only.
49
+ {{/if_lenient}}
50
+
51
+ ---
52
+
53
+ ## Summary
54
+
55
+ | Severity | Count | Included |
56
+ | -------------- | ---------------------- | ------------------------- |
57
+ | 🔴 Critical | {{CRITICAL_COUNT}} | ✅ Always |
58
+ | 🟠 Warning | {{WARNING_COUNT}} | {{WARNING_INCLUDED}} |
59
+ | 🟡 Optimization | {{OPTIMIZATION_COUNT}} | {{OPTIMIZATION_INCLUDED}} |
60
+ | 🔵 Code Quality | {{QUALITY_COUNT}} | {{QUALITY_INCLUDED}} |
61
+
62
+ ### Issue Categories
63
+
64
+ | Category | Count |
65
+ | ------------- | ------------------------ |
66
+ | Security | {{SECURITY_COUNT}} |
67
+ | Performance | {{PERFORMANCE_COUNT}} |
68
+ | Architecture | {{ARCHITECTURE_COUNT}} |
69
+ | Language/FW | {{LANG_FRAMEWORK_COUNT}} |
70
+ | Error Handling| {{ERROR_HANDLING_COUNT}} |
71
+
72
+ ---
73
+
74
+ ## Files Reviewed
75
+
76
+ ### By Component
77
+
78
+ {{#each file_groups}}
79
+ **{{group_name}}:**
80
+ {{#each files}}
81
+ - `{{this}}`
82
+ {{/each}}
83
+
84
+ {{/each}}
85
+
86
+ ---
87
+
88
+ ## Issues by Component
89
+
90
+ {{#each issues}}
91
+
92
+ ### `{{component}}`
93
+
94
+ #### `{{file}}`
95
+
96
+ ##### Issue {{index}}: {{title}}
97
+
98
+ | Attribute | Value |
99
+ | -------------- | ------------------------------- |
100
+ | **Severity** | {{severity_emoji}} {{severity}} |
101
+ | **Line** | {{line}} |
102
+ | **Type** | {{type}} |
103
+ | **Category** | {{category}} |
104
+ | **Focus Area** | {{focus_area}} |
105
+
106
+ **Description:**
107
+ {{description}}
108
+
109
+ **Code:**
110
+ ```{{language}}
111
+ // Line {{line}}
112
+ {{code_snippet}}
113
+ ```
114
+
115
+ **Recommendation:**
116
+ {{recommendation}}
117
+
118
+ {{#if suggested_fix}}
119
+ **Suggested Fix:**
120
+ ```{{language}}
121
+ {{suggested_fix}}
122
+ ```
123
+ {{/if}}
124
+
125
+ {{#if docs_link}}
126
+ **Reference:** [{{docs_title}}]({{docs_link}})
127
+ {{/if}}
128
+
129
+ {{#if agents_md_rule}}
130
+ **AGENTS.md Rule:** {{agents_md_rule}}
131
+ {{/if}}
132
+
133
+ ---
134
+
135
+ <!-- MACHINE_READABLE_START
136
+ {
137
+ "file": "{{file}}",
138
+ "line": {{line}},
139
+ "severity": "{{severity_lower}}",
140
+ "type": "{{type}}",
141
+ "category": "{{category}}",
142
+ "component": "{{component}}",
143
+ "focus_area": "{{focus_area}}",
144
+ "review_style": "{{REVIEW_STYLE}}",
145
+ "language": "{{language}}",
146
+ "tech_stack": "{{TECH_STACK}}",
147
+ "description": "{{description_escaped}}",
148
+ "recommendation": "{{recommendation_escaped}}",
149
+ "agents_md_rule": "{{agents_md_rule}}",
150
+ "solved": false
151
+ }
152
+ MACHINE_READABLE_END -->
153
+
154
+ {{/each}}
155
+
156
+ ---
157
+
158
+ ## Quick Fixes by Priority
159
+
160
+ ### 🔴 Critical (Must Fix)
161
+
162
+ {{#each critical_issues}}
163
+ - [ ] **{{file}}:{{line}}** — {{title}}
164
+ {{/each}}
165
+ {{#if_no_critical}}
166
+ ✅ No critical issues!
167
+ {{/if_no_critical}}
168
+
169
+ {{#if_not_lenient}}
170
+ ### 🟠 Warnings (Should Fix)
171
+
172
+ {{#each warning_issues}}
173
+ - [ ] **{{file}}:{{line}}** — {{title}}
174
+ {{/each}}
175
+ {{#if_no_warnings}}
176
+ ✅ No warnings!
177
+ {{/if_no_warnings}}
178
+
179
+ ### 🟡 Optimization (Nice to Have)
180
+
181
+ {{#each optimization_issues}}
182
+ - [ ] **{{file}}:{{line}}** — {{title}}
183
+ {{/each}}
184
+ {{#if_no_optimization}}
185
+ ✅ No optimization issues!
186
+ {{/if_no_optimization}}
187
+ {{/if_not_lenient}}
188
+
189
+ {{#if_strict}}
190
+ ### 🔵 Quality (Polish)
191
+
192
+ {{#each quality_issues}}
193
+ - [ ] **{{file}}:{{line}}** — {{title}}
194
+ {{/each}}
195
+ {{#if_no_quality}}
196
+ ✅ No quality issues!
197
+ {{/if_no_quality}}
198
+ {{/if_strict}}
199
+
200
+ ---
201
+
202
+ ## Project Convention Compliance
203
+
204
+ {{#if agents_md_found}}
205
+ ### Rules from AGENTS.md
206
+
207
+ | Convention | Status | Notes |
208
+ | ----------------------- | ---------------------- | ---------------------- |
209
+ {{#each convention_checks}}
210
+ | {{convention_name}} | {{status_emoji}} | {{notes}} |
211
+ {{/each}}
212
+ {{/if}}
213
+
214
+ {{#if_no_agents_md}}
215
+ > ⚠️ No `AGENTS.md` found at project root. Project-specific convention checks were skipped.
216
+ > Consider creating an `AGENTS.md` to get tailored recommendations.
217
+ {{/if_no_agents_md}}
218
+
219
+ ---
220
+
221
+ ## Report Metadata
222
+
223
+ ```json
224
+ {
225
+ "version": "1.0",
226
+ "generated_at": "{{TIMESTAMP}}",
227
+ "review_style": "{{REVIEW_STYLE}}",
228
+ "review_config": {
229
+ "severity_threshold": "{{SEVERITY_THRESHOLD}}",
230
+ "tone": "{{REVIEW_TONE}}",
231
+ "focus_areas": {
232
+ "security": "{{FOCUS_SECURITY_LEVEL}}",
233
+ "performance": "{{FOCUS_PERFORMANCE_LEVEL}}",
234
+ "bugs": "{{FOCUS_BUGS_LEVEL}}",
235
+ "code_style": "{{FOCUS_STYLE_LEVEL}}",
236
+ "test_coverage": "{{FOCUS_TESTS_LEVEL}}",
237
+ "documentation": "{{FOCUS_DOCS_LEVEL}}"
238
+ }
239
+ },
240
+ "tech_stack": "{{TECH_STACK}}",
241
+ "framework": "{{FRAMEWORK}}",
242
+ "agents_md": {{AGENTS_MD_FOUND}},
243
+ "total_files": {{FILE_COUNT}},
244
+ "total_issues": {{ISSUE_COUNT}},
245
+ "severity_breakdown": {
246
+ "critical": {{CRITICAL_COUNT}},
247
+ "warning": {{WARNING_COUNT}},
248
+ "optimization": {{OPTIMIZATION_COUNT}},
249
+ "quality": {{QUALITY_COUNT}}
250
+ },
251
+ "category_breakdown": {
252
+ "security": {{SECURITY_COUNT}},
253
+ "performance": {{PERFORMANCE_COUNT}},
254
+ "architecture": {{ARCHITECTURE_COUNT}},
255
+ "language_framework": {{LANG_FRAMEWORK_COUNT}},
256
+ "error_handling": {{ERROR_HANDLING_COUNT}}
257
+ }
258
+ }
259
+ ```
260
+
261
+ ---
262
+
263
+ *Generated by code-review skill • Full format • {{REVIEW_STYLE}} mode*
264
+ ````
@@ -0,0 +1,168 @@
1
+ ````markdown
2
+ # Code Review Report
3
+
4
+ **Generated:** {{TIMESTAMP}}
5
+ **Review Style:** {{REVIEW_STYLE_EMOJI}} {{REVIEW_STYLE}}
6
+ **Tech Stack:** {{TECH_STACK}}
7
+ **Files Reviewed:** {{FILE_COUNT}} | **Issues Found:** {{ISSUE_COUNT}}
8
+
9
+ ---
10
+
11
+ ## 🎯 Review Configuration
12
+
13
+ | Setting | Value |
14
+ | ---------------- | ------------------------------------------- |
15
+ | **Review Style** | {{REVIEW_STYLE_EMOJI}} **{{REVIEW_STYLE}}** |
16
+ | **Tech Stack** | {{TECH_STACK}} |
17
+ | **AGENTS.md** | {{AGENTS_MD_STATUS}} |
18
+
19
+ ### Focus Areas
20
+
21
+ | Focus Area | Status | Level |
22
+ | ----------------- | --------------------------- | --------------------------- |
23
+ | Security | {{FOCUS_SECURITY_EMOJI}} | {{FOCUS_SECURITY_LEVEL}} |
24
+ | Performance | {{FOCUS_PERFORMANCE_EMOJI}} | {{FOCUS_PERFORMANCE_LEVEL}} |
25
+ | Bug detection | {{FOCUS_BUGS_EMOJI}} | {{FOCUS_BUGS_LEVEL}} |
26
+ | Code style | {{FOCUS_STYLE_EMOJI}} | {{FOCUS_STYLE_LEVEL}} |
27
+ | Test coverage | {{FOCUS_TESTS_EMOJI}} | {{FOCUS_TESTS_LEVEL}} |
28
+ | Documentation | {{FOCUS_DOCS_EMOJI}} | {{FOCUS_DOCS_LEVEL}} |
29
+
30
+ ---
31
+
32
+ ## 📊 Overview
33
+
34
+ | 🔴 Critical | 🟠 Warning | 🟡 Optimize | 🔵 Quality |
35
+ | :----------------: | :---------------: | :--------------------: | :---------------: |
36
+ | {{CRITICAL_COUNT}} | {{WARNING_COUNT}} | {{OPTIMIZATION_COUNT}} | {{QUALITY_COUNT}} |
37
+
38
+ **Categories:** {{SECURITY_COUNT}} security | {{PERFORMANCE_COUNT}} performance | {{ARCHITECTURE_COUNT}} architecture | {{LANG_FRAMEWORK_COUNT}} lang/fw | {{ERROR_HANDLING_COUNT}} error handling
39
+
40
+ ---
41
+
42
+ {{#if has_critical}}
43
+ ## 🔴 Critical Issues (Fix Before Commit)
44
+
45
+ {{#each critical_issues}}
46
+ ### {{file_short}}
47
+
48
+ **Line {{line}}** — {{title}}
49
+
50
+ > {{description}}
51
+
52
+ **Fix:** {{recommendation}}
53
+
54
+ {{#if suggested_fix}}
55
+ ```{{language}}
56
+ {{suggested_fix}}
57
+ ```
58
+ {{/if}}
59
+
60
+ {{#if agents_md_rule}}
61
+ 📋 **AGENTS.md:** {{agents_md_rule}}
62
+ {{/if}}
63
+
64
+ ---
65
+ {{/each}}
66
+ {{/if}}
67
+
68
+ {{#if has_warnings}}
69
+ {{#if_not_lenient}}
70
+ ## 🟠 Warnings (Should Address)
71
+
72
+ {{#each warning_issues}}
73
+ - **{{file_short}}:{{line}}** — {{title}}
74
+ - {{description}}
75
+ - 💡 {{recommendation}}
76
+ {{/each}}
77
+
78
+ ---
79
+ {{/if_not_lenient}}
80
+ {{/if}}
81
+
82
+ {{#if has_optimization}}
83
+ {{#if_not_lenient}}
84
+ ## 🟡 Optimization Suggestions
85
+
86
+ {{#each optimization_issues}}
87
+ - **{{file_short}}:{{line}}** — {{title}}
88
+ - {{recommendation}}
89
+ {{/each}}
90
+
91
+ ---
92
+ {{/if_not_lenient}}
93
+ {{/if}}
94
+
95
+ {{#if has_quality}}
96
+ {{#if_strict}}
97
+ ## 🔵 Code Quality
98
+
99
+ {{#each quality_issues}}
100
+ - **{{file_short}}:{{line}}** — {{title}}
101
+ {{/each}}
102
+
103
+ ---
104
+ {{/if_strict}}
105
+ {{/if}}
106
+
107
+ ## ✅ Quick Action Checklist
108
+
109
+ ### Must Fix (Critical)
110
+ {{#each critical_issues}}
111
+ - [ ] `{{file_short}}:{{line}}` — {{title}}
112
+ {{/each}}
113
+ {{#if_no_critical}}
114
+ - ✅ No critical issues found!
115
+ {{/if_no_critical}}
116
+
117
+ {{#if_not_lenient}}
118
+ ### Should Fix (Warnings)
119
+ {{#each warning_issues}}
120
+ - [ ] `{{file_short}}:{{line}}` — {{title}}
121
+ {{/each}}
122
+ {{#if_no_warnings}}
123
+ - ✅ No warnings found!
124
+ {{/if_no_warnings}}
125
+
126
+ ### Nice to Have (Optimization)
127
+ {{#each optimization_issues}}
128
+ - [ ] `{{file_short}}:{{line}}` — {{title}}
129
+ {{/each}}
130
+ {{/if_not_lenient}}
131
+
132
+ {{#if_strict}}
133
+ ### Polish (Quality)
134
+ {{#each quality_issues}}
135
+ - [ ] `{{file_short}}:{{line}}` — {{title}}
136
+ {{/each}}
137
+ {{/if_strict}}
138
+
139
+ ---
140
+
141
+ {{#if agents_md_found}}
142
+ ## 📋 AGENTS.md Convention Compliance
143
+
144
+ {{#each convention_checks}}
145
+ - {{status_emoji}} **{{convention_name}}** — {{notes}}
146
+ {{/each}}
147
+ {{/if}}
148
+
149
+ ---
150
+
151
+ ## 💬 Review Summary
152
+
153
+ {{#if_strict}}
154
+ > **Strict Mode:** This review flagged all potential issues across all focus areas. Address critical and warning issues before committing. Quality issues are optional but recommended for production code.
155
+ {{/if_strict}}
156
+
157
+ {{#if_balanced}}
158
+ > **Balanced Mode:** This review focused on high-confidence issues. Critical issues must be fixed. Warnings are strongly recommended. Lower severity items were filtered for practicality.
159
+ {{/if_balanced}}
160
+
161
+ {{#if_lenient}}
162
+ > **Lenient Mode:** This review only flagged critical bugs and security issues. Great job on the code! 🎉 Only urgent items require attention before commit.
163
+ {{/if_lenient}}
164
+
165
+ ---
166
+
167
+ *Generated by code-review skill • Human-readable format • {{REVIEW_STYLE}} mode*
168
+ ````