@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,373 @@
1
+ ---
2
+ name: code-review
3
+ description: Perform static code review on git staged files for any programming language, framework, or project type. Dynamically adapts to the project by reading AGENTS.md for tech stack, conventions, and architecture context. Identifies security vulnerabilities, performance issues, bugs, anti-patterns, and code style violations. Outputs structured Markdown report to test-hunter/ folder. Use when reviewing code before commit, or with /code-review command.
4
+ ---
5
+
6
+ # Universal Code Review
7
+
8
+ Perform static code review on staged git files. Adapts to any language, framework, or project type by reading the project's `AGENTS.md` for context.
9
+
10
+ ## Quick Start
11
+
12
+ 1. **READ PROJECT CONTEXT** from `AGENTS.md` at the project root (required)
13
+ 2. **ASK USER** which review style to use (Strict/Balanced/Lenient) — default: Balanced
14
+ 3. **ASK USER** which report format to use (Full/Human/Compact/Agent)
15
+ 4. Get staged files: `git diff --cached --name-only`
16
+ 5. Detect project tech stack from file extensions, config files, and `AGENTS.md`
17
+ 6. Analyze each file based on review style, tech stack, and project conventions
18
+ 7. Generate report to `test-hunter/review-<timestamp>.md`
19
+
20
+ ---
21
+
22
+ ## Step 0: Read Project Context (REQUIRED)
23
+
24
+ Before any analysis, read the project's `AGENTS.md` file from the repository root:
25
+
26
+ ```bash
27
+ cat AGENTS.md
28
+ ```
29
+
30
+ Extract the following from `AGENTS.md` (if present):
31
+ - **Tech stack** — languages, frameworks, versions
32
+ - **Architecture patterns** — MVC, microservices, monorepo, etc.
33
+ - **Code conventions** — naming, formatting, structure rules
34
+ - **Testing strategy** — unit, integration, e2e expectations
35
+ - **Domain context** — business logic constraints
36
+ - **Important constraints** — regulatory, performance, security requirements
37
+
38
+ If `AGENTS.md` is missing or incomplete, infer context from:
39
+ 1. Config files: `package.json`, `composer.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `Gemfile`, etc.
40
+ 2. File extensions in staged files
41
+ 3. Directory structure patterns
42
+
43
+ Store the detected context as your **Project Profile** for the review session.
44
+
45
+ ---
46
+
47
+ ## Step 1: Ask User for Review Style (REQUIRED)
48
+
49
+ Present the following options:
50
+
51
+ ```
52
+ Which review style would you like? (Default: Balanced)
53
+
54
+ 1. **Strict** 🔒
55
+ Flag all potential issues, prioritize quality and security
56
+
57
+ Focus Areas:
58
+ ✅ Security vulnerabilities
59
+ ✅ Performance issues
60
+ ✅ Bug detection
61
+ ✅ Code style & conventions
62
+ ✅ Test coverage
63
+ ✅ Documentation
64
+
65
+ 2. **Balanced** ⚖️ (Default)
66
+ Focus on high-confidence issues, balance thoroughness with practicality
67
+
68
+ Focus Areas:
69
+ ✅ Security vulnerabilities
70
+ ✅ Performance issues
71
+ ✅ Bug detection
72
+ ⚪ Code style (major violations only)
73
+ ⚪ Test coverage (critical paths only)
74
+ ❌ Documentation
75
+
76
+ 3. **Lenient** 💚
77
+ Only critical bugs and security issues, be encouraging
78
+
79
+ Focus Areas:
80
+ ✅ Security vulnerabilities (critical only)
81
+ ⚪ Performance issues (severe bottlenecks only)
82
+ ✅ Bug detection (critical bugs only)
83
+ ❌ Code style
84
+ ❌ Test coverage
85
+ ❌ Documentation
86
+
87
+ Please select (1-3) or type the style name, or press Enter for Balanced:
88
+ ```
89
+
90
+ Wait for user response. Default to Balanced if no response.
91
+
92
+ ### Review Style Configuration
93
+
94
+ | Focus Area | Strict | Balanced | Lenient |
95
+ | ----------------- | -------------- | ---------------- | ------------------ |
96
+ | Security | All issues | All issues | Critical only |
97
+ | Performance | All issues | All issues | Severe bottlenecks |
98
+ | Bug detection | All issues | High confidence | Critical only |
99
+ | Code style | All issues | Major violations | ❌ Skip |
100
+ | Test coverage | All issues | Critical paths | ❌ Skip |
101
+ | Documentation | All issues | ❌ Skip | ❌ Skip |
102
+
103
+ ### Severity Threshold by Style
104
+
105
+ | Style | Report Threshold | Tone |
106
+ | -------- | ---------------------- | ----------------------- |
107
+ | Strict | All severities (🔴🟠🟡🔵) | Direct, thorough |
108
+ | Balanced | Warning+ (🔴🟠🟡) | Constructive, practical |
109
+ | Lenient | Critical only (🔴) | Encouraging, supportive |
110
+
111
+ ---
112
+
113
+ ## Step 2: Ask User for Report Format (REQUIRED)
114
+
115
+ ```
116
+ Which report format would you like?
117
+
118
+ 1. **Full** - Complete detailed analysis (~200-300 lines per file)
119
+ 2. **Human** - Optimized for readability (~50-80 lines per file)
120
+ 3. **Compact** - Condensed summary (~15-25 lines per file)
121
+ 4. **Agent** - Machine-readable for AI tools (~30-50 lines per file)
122
+
123
+ Please select (1-4) or type the format name:
124
+ ```
125
+
126
+ Wait for user response.
127
+
128
+ ---
129
+
130
+ ## Workflow
131
+
132
+ ### Step 3: Retrieve Staged Files
133
+
134
+ ```bash
135
+ git diff --cached --name-only
136
+ ```
137
+
138
+ ### Step 4: Detect Tech Stack & Categorize Files
139
+
140
+ Identify the project's tech stack from staged files and project context. Group files by logical component based on the detected stack.
141
+
142
+ **Auto-detection signals:**
143
+
144
+ | Signal | Tech Stack |
145
+ | --- | --- |
146
+ | `*.py`, `pyproject.toml`, `requirements.txt` | Python |
147
+ | `*.ts`, `*.tsx`, `package.json` | TypeScript/JavaScript |
148
+ | `*.php`, `composer.json` | PHP |
149
+ | `*.go`, `go.mod` | Go |
150
+ | `*.rs`, `Cargo.toml` | Rust |
151
+ | `*.java`, `pom.xml`, `build.gradle` | Java |
152
+ | `*.rb`, `Gemfile` | Ruby |
153
+ | `*.cs`, `*.csproj` | C# / .NET |
154
+ | `*.swift`, `Package.swift` | Swift |
155
+ | `*.kt`, `build.gradle.kts` | Kotlin |
156
+ | `*.dart`, `pubspec.yaml` | Dart/Flutter |
157
+ | `*.vue`, `*.svelte` | Vue/Svelte SFC |
158
+ | `*.blade.php` | Laravel Blade |
159
+ | `*.erb`, `*.haml` | Ruby templates |
160
+ | `Dockerfile`, `docker-compose.yml` | Docker/Infrastructure |
161
+ | `*.yaml`, `*.yml`, `*.toml`, `*.json` | Configuration |
162
+ | `*.sql` | Database |
163
+ | `*.sh`, `*.bash`, `*.zsh` | Shell scripts |
164
+
165
+ **Framework detection (from config files and AGENTS.md):**
166
+
167
+ | Signal | Framework |
168
+ | --- | --- |
169
+ | `next.config.*`, `app/layout.tsx` | Next.js |
170
+ | `nuxt.config.*` | Nuxt |
171
+ | `svelte.config.*` | SvelteKit |
172
+ | `angular.json` | Angular |
173
+ | `artisan`, `app/Http/Controllers/` | Laravel |
174
+ | `manage.py`, `settings.py` | Django |
175
+ | `Gemfile` + `config/routes.rb` | Rails |
176
+ | `main.go` + `go.mod` | Go (stdlib/framework) |
177
+ | `Cargo.toml` + `src/main.rs` | Rust |
178
+ | `pom.xml` + `src/main/java` | Spring Boot / Java |
179
+ | `pubspec.yaml` + `lib/main.dart` | Flutter |
180
+
181
+ Categorize staged files into logical groups:
182
+ - **Source code** — application logic
183
+ - **Tests** — test files (review only, no execution)
184
+ - **Configuration** — config files, env, CI/CD
185
+ - **Infrastructure** — Docker, deployment, IaC
186
+ - **Documentation** — README, docs, comments
187
+ - **Database** — migrations, schemas, seeds
188
+ - **Templates/Views** — UI templates, components
189
+
190
+ ### Step 5: Analyze Each File
191
+
192
+ **Apply Review Style Filter** based on the user's selection from Step 1.
193
+
194
+ Review for these universal issue categories (filtered by review style):
195
+
196
+ #### 🔴 Critical Issues
197
+
198
+ **Security Vulnerabilities (all languages):**
199
+ - Injection flaws (SQL, command, template, LDAP, XPath)
200
+ - Cross-site scripting (XSS) — unescaped user input in output
201
+ - Authentication/authorization bypasses
202
+ - Hardcoded secrets, API keys, credentials
203
+ - Insecure deserialization
204
+ - Path traversal / directory traversal
205
+ - Insecure cryptography (weak algorithms, hardcoded keys)
206
+ - Missing input validation/sanitization
207
+ - CSRF vulnerabilities in web frameworks
208
+ - Mass assignment / over-posting
209
+ - Exposed sensitive data in responses or logs
210
+
211
+ **Runtime Errors:**
212
+ - Null/undefined reference errors
213
+ - Unhandled exceptions in critical paths
214
+ - Type mismatches in dynamically typed languages
215
+ - Missing error handling for I/O operations
216
+ - Race conditions in concurrent code
217
+ - Resource leaks (unclosed connections, file handles, streams)
218
+ - Buffer overflows (C/C++/Rust unsafe blocks)
219
+
220
+ #### 🟠 Warning Issues
221
+
222
+ **Performance Anti-patterns:**
223
+ - N+1 query problems (ORM/database)
224
+ - Missing pagination for large datasets
225
+ - Synchronous operations that should be async
226
+ - Inefficient algorithms (O(n²) where O(n) is possible)
227
+ - Missing caching for repeated expensive operations
228
+ - Unnecessary memory allocations in hot paths
229
+ - Loading full objects when only subset is needed
230
+ - Missing database indexes for frequently queried columns
231
+ - Blocking the main/event thread
232
+
233
+ **Architecture & Design:**
234
+ - God objects / classes with too many responsibilities
235
+ - Tight coupling between unrelated modules
236
+ - Business logic in wrong layer (e.g., in controllers, views, templates)
237
+ - Missing abstraction for repeated patterns
238
+ - Circular dependencies
239
+ - Violation of project's stated architecture patterns (from `AGENTS.md`)
240
+
241
+ **Error Handling:**
242
+ - Swallowed exceptions (empty catch blocks)
243
+ - Overly broad exception catching
244
+ - Missing error propagation
245
+ - Inconsistent error handling patterns
246
+
247
+ #### 🟡 Optimization Issues
248
+
249
+ **Resource Efficiency:**
250
+ - Redundant computations
251
+ - Missing lazy loading / eager loading (context-dependent)
252
+ - Suboptimal data structures
253
+ - Unnecessary network calls
254
+ - Missing connection pooling
255
+ - Redundant database queries
256
+
257
+ **Code Duplication:**
258
+ - Copy-pasted logic that should be extracted
259
+ - Repeated patterns across files
260
+ - Magic numbers/strings that should be constants
261
+
262
+ #### 🔵 Code Quality Issues
263
+
264
+ **Language Best Practices:**
265
+ - Not using modern language features (based on detected version)
266
+ - Missing type annotations (TypeScript, Python, PHP 8+)
267
+ - Deprecated API usage
268
+ - Inconsistent naming conventions
269
+ - Dead code / unreachable branches
270
+ - Overly complex expressions (cyclomatic complexity)
271
+ - Missing return types
272
+
273
+ **Project Convention Violations (from AGENTS.md):**
274
+ - Naming convention violations
275
+ - File organization violations
276
+ - Architecture pattern deviations
277
+ - Testing strategy violations
278
+
279
+ **Documentation:**
280
+ - Missing function/method documentation for public APIs
281
+ - Outdated or misleading comments
282
+ - TODO/FIXME/HACK markers that need attention
283
+
284
+ ### Step 6: Apply Project-Specific Rules
285
+
286
+ Based on the **Project Profile** from `AGENTS.md`, apply additional checks:
287
+
288
+ 1. **If AGENTS.md specifies coding standards** — validate against them
289
+ 2. **If AGENTS.md specifies architecture** — check layer violations
290
+ 3. **If AGENTS.md specifies testing requirements** — check test coverage
291
+ 4. **If AGENTS.md specifies naming conventions** — validate names
292
+ 5. **If AGENTS.md specifies security constraints** — apply stricter security checks
293
+
294
+ For deeper language/framework-specific patterns, load the appropriate reference:
295
+ - See `references/universal-patterns.md` for cross-language detection patterns
296
+
297
+ ### Step 7: Generate Report
298
+
299
+ ```bash
300
+ mkdir -p test-hunter
301
+ ```
302
+
303
+ Filename: `review-YYYY-MM-DD-HHMMSS.md`
304
+
305
+ ### Step 8: Write Report
306
+
307
+ Use the selected report format template from `assets/`:
308
+
309
+ | Format | Template File | Use Case |
310
+ | ------- | ----------------------------------- | -------------------------- |
311
+ | Full | `assets/report-template-full.md` | Comprehensive review |
312
+ | Human | `assets/report-template-human.md` | Developer-friendly reading |
313
+ | Compact | `assets/report-template-compact.md` | Quick summary |
314
+ | Agent | `assets/report-template-agent.md` | CI/CD & AI integration |
315
+
316
+ ---
317
+
318
+ ## Issue Categories Reference
319
+
320
+ ### Security
321
+ - `injection` — SQL, command, template injection
322
+ - `xss` — Cross-site scripting
323
+ - `auth-bypass` — Authentication/authorization issues
324
+ - `secrets` — Hardcoded credentials, exposed keys
325
+ - `csrf` — Cross-site request forgery
326
+ - `mass-assignment` — Over-posting / mass assignment
327
+ - `insecure-crypto` — Weak cryptography
328
+ - `path-traversal` — Directory traversal
329
+
330
+ ### Performance
331
+ - `n-plus-one` — N+1 query problem
332
+ - `blocking-io` — Synchronous blocking in async context
333
+ - `missing-index` — Missing database index
334
+ - `inefficient-algorithm` — Suboptimal algorithm complexity
335
+ - `missing-cache` — Missing caching opportunity
336
+ - `memory-leak` — Resource/memory leak
337
+ - `unnecessary-load` — Loading more data than needed
338
+
339
+ ### Architecture
340
+ - `god-object` — Class with too many responsibilities
341
+ - `wrong-layer` — Logic in the wrong architectural layer
342
+ - `tight-coupling` — Unnecessary coupling between modules
343
+ - `circular-dependency` — Circular import/dependency
344
+ - `code-duplication` — Duplicated logic
345
+
346
+ ### Language & Framework
347
+ - `deprecated-api` — Using deprecated features
348
+ - `missing-types` — Missing type annotations
349
+ - `modern-syntax` — Not using modern language features
350
+ - `convention-violation` — Project convention violations
351
+ - `dead-code` — Unreachable or unused code
352
+
353
+ ### Error Handling
354
+ - `swallowed-exception` — Empty catch block
355
+ - `missing-error-handling` — Unhandled error case
356
+ - `broad-catch` — Catching too broad an exception type
357
+
358
+ ## Severity Classification
359
+
360
+ | Severity | Emoji | Criteria |
361
+ | ------------ | ----- | ----------------------------------------------------- |
362
+ | Critical | 🔴 | Security vulnerabilities, data loss risks, crashes |
363
+ | Warning | 🟠 | Performance issues, design flaws, error handling gaps |
364
+ | Optimization | 🟡 | Efficiency improvements, code duplication |
365
+ | Quality | 🔵 | Best practices, conventions, modern syntax, docs |
366
+
367
+ ## Output Location
368
+
369
+ Save to: `<project-root>/test-hunter/review-<timestamp>.md`
370
+
371
+ ## Resources
372
+
373
+ - See `references/universal-patterns.md` for cross-language detection patterns
@@ -0,0 +1,212 @@
1
+ ````markdown
2
+ # Code Review — Agent Task List
3
+
4
+ > Executable task list for AI agents. Process each task sequentially, marking as complete when done.
5
+
6
+ ## Review Summary
7
+
8
+ | Attribute | Value |
9
+ | ------------------ | ------------------------------------ |
10
+ | **Generated** | {{TIMESTAMP}} |
11
+ | **Review Style** | {{REVIEW_STYLE}} |
12
+ | **Tech Stack** | {{TECH_STACK}} |
13
+ | **Framework** | {{FRAMEWORK}} |
14
+ | **AGENTS.md** | {{AGENTS_MD_STATUS}} |
15
+ | **Files Reviewed** | {{FILE_COUNT}} |
16
+ | **Total Tasks** | {{TASK_COUNT}} |
17
+ | **Completed** | {{COMPLETED_COUNT}} / {{TASK_COUNT}} |
18
+
19
+ ### Task Statistics
20
+
21
+ | Priority | Total | Remaining | Completed |
22
+ | -------------- | ---------------------- | -------------------------- | -------------------------- |
23
+ | 🔴 Critical | {{CRITICAL_COUNT}} | {{CRITICAL_REMAINING}} | {{CRITICAL_COMPLETED}} |
24
+ | 🟠 Warning | {{WARNING_COUNT}} | {{WARNING_REMAINING}} | {{WARNING_COMPLETED}} |
25
+ | 🟡 Optimization | {{OPTIMIZATION_COUNT}} | {{OPTIMIZATION_REMAINING}} | {{OPTIMIZATION_COMPLETED}} |
26
+ | 🔵 Quality | {{QUALITY_COUNT}} | {{QUALITY_REMAINING}} | {{QUALITY_COMPLETED}} |
27
+
28
+ ### Categories
29
+
30
+ | Category | Count |
31
+ | -------------- | ------------------------ |
32
+ | Security | {{SECURITY_COUNT}} |
33
+ | Performance | {{PERFORMANCE_COUNT}} |
34
+ | Architecture | {{ARCHITECTURE_COUNT}} |
35
+ | Language/FW | {{LANG_FRAMEWORK_COUNT}} |
36
+ | Error Handling | {{ERROR_HANDLING_COUNT}} |
37
+
38
+ ---
39
+
40
+ ## Pending Tasks
41
+
42
+ > Execute these tasks in order. Check the box `[x]` when completed.
43
+
44
+ ### 🔴 Critical Tasks (Execute First)
45
+
46
+ {{#each critical_tasks}}
47
+ - [ ] **TASK-{{task_id}}** | `{{file}}:{{line}}` | {{component}}
48
+ - **Issue:** {{title}}
49
+ - **Category:** {{category}}
50
+ - **Language:** {{language}}
51
+ - **Action:** {{action_verb}}
52
+ - **Target Code:**
53
+ ```{{language}}
54
+ {{target_code}}
55
+ ```
56
+ - **Replace With:**
57
+ ```{{language}}
58
+ {{replacement_code}}
59
+ ```
60
+ {{#if docs_link}}
61
+ - **Docs:** [{{docs_title}}]({{docs_link}})
62
+ {{/if}}
63
+ {{#if agents_md_rule}}
64
+ - **AGENTS.md Rule:** {{agents_md_rule}}
65
+ {{/if}}
66
+
67
+ {{/each}}
68
+
69
+ ### 🟠 Warning Tasks
70
+
71
+ {{#each warning_tasks}}
72
+ - [ ] **TASK-{{task_id}}** | `{{file}}:{{line}}` | {{component}}
73
+ - **Issue:** {{title}}
74
+ - **Category:** {{category}}
75
+ - **Action:** {{action_verb}}
76
+ - **Details:** {{description}}
77
+ - **Fix:** {{recommendation}}
78
+
79
+ {{/each}}
80
+
81
+ ### 🟡 Optimization Tasks
82
+
83
+ {{#each optimization_tasks}}
84
+ - [ ] **TASK-{{task_id}}** | `{{file}}:{{line}}` | {{component}}
85
+ - **Issue:** {{title}}
86
+ - **Improvement:** {{recommendation}}
87
+
88
+ {{/each}}
89
+
90
+ ### 🔵 Quality Tasks
91
+
92
+ {{#each quality_tasks}}
93
+ - [ ] **TASK-{{task_id}}** | `{{file}}:{{line}}` | {{component}}
94
+ - **Issue:** {{title}}
95
+ - **Suggestion:** {{recommendation}}
96
+
97
+ {{/each}}
98
+
99
+ ---
100
+
101
+ ## Completed Tasks
102
+
103
+ > Move completed tasks here with `[x]` checked.
104
+
105
+ {{#each completed_tasks}}
106
+ - [x] **TASK-{{task_id}}** | `{{file}}:{{line}}` — {{title}} ✅
107
+ {{/each}}
108
+
109
+ ---
110
+
111
+ ## Agent Execution Commands
112
+
113
+ > Ready-to-execute commands for automated processing.
114
+
115
+ ### File Edit Operations
116
+
117
+ ```json
118
+ {
119
+ "operations": [
120
+ {{#each edit_operations}}
121
+ {
122
+ "task_id": "TASK-{{task_id}}",
123
+ "operation": "replace",
124
+ "file": "{{file}}",
125
+ "language": "{{language}}",
126
+ "component": "{{component}}",
127
+ "start_line": {{start_line}},
128
+ "end_line": {{end_line}},
129
+ "target": "{{target_code_escaped}}",
130
+ "replacement": "{{replacement_code_escaped}}",
131
+ "status": "{{status}}"
132
+ }{{#unless @last}},{{/unless}}
133
+ {{/each}}
134
+ ]
135
+ }
136
+ ```
137
+
138
+ ### Validation Commands
139
+
140
+ After completing tasks, run project-appropriate validation:
141
+
142
+ ```bash
143
+ # Detect and run project linter/formatter
144
+ # (adapt to actual project tooling from AGENTS.md or config)
145
+
146
+ # JavaScript/TypeScript
147
+ npm run lint && npm test
148
+
149
+ # Python
150
+ ruff check . && pytest
151
+
152
+ # PHP
153
+ ./vendor/bin/phpstan analyse && ./vendor/bin/pint --test && php artisan test
154
+
155
+ # Go
156
+ go vet ./... && go test ./...
157
+
158
+ # Rust
159
+ cargo clippy && cargo test
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Task Execution Protocol
165
+
166
+ For each pending task:
167
+
168
+ 1. **READ** the task details and target code
169
+ 2. **LOCATE** the file and line number
170
+ 3. **APPLY** the replacement code or fix
171
+ 4. **VERIFY** the change doesn't break other code
172
+ 5. **MARK** the task as complete `[x]`
173
+ 6. **MOVE** to Completed Tasks section
174
+
175
+ ### Status Flags
176
+
177
+ ```json
178
+ {
179
+ "review_style": "{{REVIEW_STYLE}}",
180
+ "tech_stack": "{{TECH_STACK}}",
181
+ "agents_md_loaded": {{AGENTS_MD_FOUND}},
182
+ "all_critical_resolved": {{all_critical_resolved}},
183
+ "all_warnings_resolved": {{all_warnings_resolved}},
184
+ "ready_for_commit": {{ready_for_commit}},
185
+ "requires_human_review": {{requires_human_review}},
186
+ "blocking_issues": {{blocking_count}},
187
+ "has_security_issues": {{has_security}}
188
+ }
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Quick Reference
194
+
195
+ | Task ID Format | Meaning |
196
+ | -------------- | --------------------- |
197
+ | `TASK-C###` | Critical priority |
198
+ | `TASK-W###` | Warning priority |
199
+ | `TASK-O###` | Optimization priority |
200
+ | `TASK-Q###` | Quality priority |
201
+
202
+ | Status | Symbol |
203
+ | ----------- | ------ |
204
+ | Pending | `[ ]` |
205
+ | In Progress | `[-]` |
206
+ | Completed | `[x]` |
207
+ | Skipped | `[~]` |
208
+
209
+ ---
210
+
211
+ *Format: agent-tasks | Schema: code-review/v1 | {{REVIEW_STYLE}} mode*
212
+ ````
@@ -0,0 +1,81 @@
1
+ ```markdown
2
+ # Code Review — Compact
3
+
4
+ **{{TIMESTAMP}}** | **{{REVIEW_STYLE}}** mode | {{TECH_STACK}} | {{FILE_COUNT}} files | {{ISSUE_COUNT}} issues
5
+
6
+ ## Review Configuration
7
+
8
+ | Style | AGENTS.md | Focus Areas Applied |
9
+ | ------------------------------------------- | --------------------- | ----------------------- |
10
+ | {{REVIEW_STYLE_EMOJI}} **{{REVIEW_STYLE}}** | {{AGENTS_MD_STATUS}} | {{FOCUS_AREAS_SUMMARY}} |
11
+
12
+ ## Summary
13
+
14
+ 🔴 {{CRITICAL_COUNT}} critical | 🟠 {{WARNING_COUNT}} warning | 🟡 {{OPTIMIZATION_COUNT}} optimize | 🔵 {{QUALITY_COUNT}} quality
15
+
16
+ **By Category:** {{SECURITY_COUNT}} sec | {{PERFORMANCE_COUNT}} perf | {{ARCHITECTURE_COUNT}} arch | {{LANG_FRAMEWORK_COUNT}} lang | {{ERROR_HANDLING_COUNT}} err
17
+
18
+ ---
19
+
20
+ ## Issues
21
+
22
+ | Sev | File | Line | Issue | Category |
23
+ | --- | ---- | ---: | ----- | -------- |
24
+ {{#each issues}}
25
+ | {{severity_emoji}} | `{{file_short}}` | {{line}} | {{title}} | {{category}} |
26
+ {{/each}}
27
+
28
+ ---
29
+
30
+ ## By Component
31
+
32
+ {{#each components_with_issues}}
33
+ ### {{component}}
34
+
35
+ {{#each files}}
36
+ **`{{file_short}}`**
37
+ {{#each issues}}
38
+ - {{severity_emoji}} L{{line}}: {{title}} → {{recommendation_short}}
39
+ {{/each}}
40
+
41
+ {{/each}}
42
+ {{/each}}
43
+
44
+ ---
45
+
46
+ ## Action Items
47
+
48
+ **🔴 Critical ({{CRITICAL_COUNT}}):**
49
+ {{#each critical_issues}}
50
+ - [ ] {{file_short}}:{{line}} — {{title}}
51
+ {{/each}}
52
+
53
+ {{#if_not_lenient}}
54
+ **🟠 Warnings ({{WARNING_COUNT}}):**
55
+ {{#each warning_issues}}
56
+ - [ ] {{file_short}}:{{line}} — {{title}}
57
+ {{/each}}
58
+
59
+ **🟡 Optimization ({{OPTIMIZATION_COUNT}}):**
60
+ {{#each optimization_issues}}
61
+ - [ ] {{file_short}}:{{line}} — {{title}}
62
+ {{/each}}
63
+ {{/if_not_lenient}}
64
+
65
+ {{#if_strict}}
66
+ **🔵 Quality ({{QUALITY_COUNT}}):**
67
+ {{#each quality_issues}}
68
+ - [ ] {{file_short}}:{{line}} — {{title}}
69
+ {{/each}}
70
+ {{/if_strict}}
71
+
72
+ ---
73
+
74
+ ## Focus Areas Applied
75
+
76
+ {{#if FOCUS_SECURITY}}✅{{else}}❌{{/if}} Security | {{#if FOCUS_PERFORMANCE}}✅{{else}}❌{{/if}} Performance | {{#if FOCUS_BUGS}}✅{{else}}❌{{/if}} Bugs | {{#if FOCUS_STYLE}}✅{{else}}❌{{/if}} Style | {{#if FOCUS_TESTS}}✅{{else}}❌{{/if}} Tests | {{#if FOCUS_DOCS}}✅{{else}}❌{{/if}} Docs
77
+
78
+ ---
79
+
80
+ *code-review • compact • {{REVIEW_STYLE}}*
81
+ ```