ace-review 0.49.0

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.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/.ace-defaults/nav/protocols/guide-sources/ace-review.yml +10 -0
  3. data/.ace-defaults/nav/protocols/prompt-sources/ace-review.yml +36 -0
  4. data/.ace-defaults/nav/protocols/tmpl-sources/ace-review.yml +10 -0
  5. data/.ace-defaults/nav/protocols/wfi-sources/ace-review.yml +19 -0
  6. data/.ace-defaults/review/config.yml +79 -0
  7. data/.ace-defaults/review/presets/code-fit.yml +64 -0
  8. data/.ace-defaults/review/presets/code-shine.yml +44 -0
  9. data/.ace-defaults/review/presets/code-valid.yml +39 -0
  10. data/.ace-defaults/review/presets/docs.yml +42 -0
  11. data/.ace-defaults/review/presets/spec.yml +37 -0
  12. data/CHANGELOG.md +1780 -0
  13. data/LICENSE +21 -0
  14. data/README.md +42 -0
  15. data/Rakefile +14 -0
  16. data/exe/ace-review +27 -0
  17. data/exe/ace-review-feedback +17 -0
  18. data/handbook/guides/code-review-process.g.md +234 -0
  19. data/handbook/prompts/base/sections.md +23 -0
  20. data/handbook/prompts/base/system.md +60 -0
  21. data/handbook/prompts/focus/architecture/atom.md +30 -0
  22. data/handbook/prompts/focus/architecture/reflection.md +60 -0
  23. data/handbook/prompts/focus/frameworks/rails.md +40 -0
  24. data/handbook/prompts/focus/frameworks/vue-firebase.md +45 -0
  25. data/handbook/prompts/focus/languages/ruby.md +50 -0
  26. data/handbook/prompts/focus/phase/correctness.md +51 -0
  27. data/handbook/prompts/focus/phase/polish.md +43 -0
  28. data/handbook/prompts/focus/phase/quality.md +42 -0
  29. data/handbook/prompts/focus/quality/performance.md +48 -0
  30. data/handbook/prompts/focus/quality/security.md +47 -0
  31. data/handbook/prompts/focus/scope/docs.md +38 -0
  32. data/handbook/prompts/focus/scope/spec.md +58 -0
  33. data/handbook/prompts/focus/scope/tests.md +36 -0
  34. data/handbook/prompts/format/compact.md +12 -0
  35. data/handbook/prompts/format/detailed.md +39 -0
  36. data/handbook/prompts/format/standard.md +16 -0
  37. data/handbook/prompts/guidelines/icons.md +19 -0
  38. data/handbook/prompts/guidelines/tone.md +21 -0
  39. data/handbook/prompts/synthesis-review-reports.system.md +318 -0
  40. data/handbook/prompts/synthesize-feedback.system.md +147 -0
  41. data/handbook/skills/as-review-apply-feedback/SKILL.md +39 -0
  42. data/handbook/skills/as-review-package/SKILL.md +36 -0
  43. data/handbook/skills/as-review-pr/SKILL.md +38 -0
  44. data/handbook/skills/as-review-run/SKILL.md +30 -0
  45. data/handbook/skills/as-review-verify-feedback/SKILL.md +31 -0
  46. data/handbook/templates/review-tasks/task-review-summary.template.md +148 -0
  47. data/handbook/workflow-instructions/review/apply-feedback.wf.md +212 -0
  48. data/handbook/workflow-instructions/review/package.wf.md +16 -0
  49. data/handbook/workflow-instructions/review/pr.wf.md +284 -0
  50. data/handbook/workflow-instructions/review/run.wf.md +262 -0
  51. data/handbook/workflow-instructions/review/verify-feedback.wf.md +286 -0
  52. data/lib/ace/review/atoms/context_limit_resolver.rb +162 -0
  53. data/lib/ace/review/atoms/diff_boundary_finder.rb +133 -0
  54. data/lib/ace/review/atoms/feedback_id_generator.rb +66 -0
  55. data/lib/ace/review/atoms/feedback_slug_generator.rb +61 -0
  56. data/lib/ace/review/atoms/feedback_state_validator.rb +98 -0
  57. data/lib/ace/review/atoms/pr_comment_formatter.rb +325 -0
  58. data/lib/ace/review/atoms/preset_validator.rb +103 -0
  59. data/lib/ace/review/atoms/priority_filter.rb +115 -0
  60. data/lib/ace/review/atoms/retry_with_backoff.rb +75 -0
  61. data/lib/ace/review/atoms/slug_generator.rb +50 -0
  62. data/lib/ace/review/atoms/token_estimator.rb +86 -0
  63. data/lib/ace/review/cli/commands/feedback/create.rb +173 -0
  64. data/lib/ace/review/cli/commands/feedback/list.rb +280 -0
  65. data/lib/ace/review/cli/commands/feedback/resolve.rb +109 -0
  66. data/lib/ace/review/cli/commands/feedback/session_discovery.rb +70 -0
  67. data/lib/ace/review/cli/commands/feedback/show.rb +177 -0
  68. data/lib/ace/review/cli/commands/feedback/skip.rb +125 -0
  69. data/lib/ace/review/cli/commands/feedback/verify.rb +149 -0
  70. data/lib/ace/review/cli/commands/feedback.rb +79 -0
  71. data/lib/ace/review/cli/commands/review.rb +378 -0
  72. data/lib/ace/review/cli/feedback_cli.rb +71 -0
  73. data/lib/ace/review/cli.rb +103 -0
  74. data/lib/ace/review/errors.rb +146 -0
  75. data/lib/ace/review/models/feedback_item.rb +216 -0
  76. data/lib/ace/review/models/review_options.rb +208 -0
  77. data/lib/ace/review/models/reviewer.rb +181 -0
  78. data/lib/ace/review/molecules/context_composer.rb +123 -0
  79. data/lib/ace/review/molecules/context_extractor.rb +159 -0
  80. data/lib/ace/review/molecules/feedback_directory_manager.rb +183 -0
  81. data/lib/ace/review/molecules/feedback_file_reader.rb +178 -0
  82. data/lib/ace/review/molecules/feedback_file_writer.rb +210 -0
  83. data/lib/ace/review/molecules/feedback_synthesizer.rb +588 -0
  84. data/lib/ace/review/molecules/gh_cli_executor.rb +124 -0
  85. data/lib/ace/review/molecules/gh_comment_poster.rb +205 -0
  86. data/lib/ace/review/molecules/gh_comment_resolver.rb +199 -0
  87. data/lib/ace/review/molecules/gh_pr_comment_fetcher.rb +408 -0
  88. data/lib/ace/review/molecules/gh_pr_fetcher.rb +240 -0
  89. data/lib/ace/review/molecules/llm_executor.rb +142 -0
  90. data/lib/ace/review/molecules/multi_model_executor.rb +278 -0
  91. data/lib/ace/review/molecules/nav_prompt_resolver.rb +145 -0
  92. data/lib/ace/review/molecules/pr_task_spec_resolver.rb +58 -0
  93. data/lib/ace/review/molecules/preset_manager.rb +494 -0
  94. data/lib/ace/review/molecules/prompt_composer.rb +76 -0
  95. data/lib/ace/review/molecules/prompt_resolver.rb +168 -0
  96. data/lib/ace/review/molecules/strategies/adaptive_strategy.rb +193 -0
  97. data/lib/ace/review/molecules/strategies/chunked_strategy.rb +459 -0
  98. data/lib/ace/review/molecules/strategies/full_strategy.rb +114 -0
  99. data/lib/ace/review/molecules/subject_extractor.rb +315 -0
  100. data/lib/ace/review/molecules/subject_filter.rb +199 -0
  101. data/lib/ace/review/molecules/subject_strategy.rb +96 -0
  102. data/lib/ace/review/molecules/task_report_saver.rb +161 -0
  103. data/lib/ace/review/molecules/task_resolver.rb +48 -0
  104. data/lib/ace/review/organisms/feedback_manager.rb +386 -0
  105. data/lib/ace/review/organisms/review_manager.rb +1059 -0
  106. data/lib/ace/review/version.rb +7 -0
  107. data/lib/ace/review.rb +135 -0
  108. metadata +351 -0
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ACE Meta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ <div align="center">
2
+ <h1> ACE - Review </h1>
3
+
4
+ Multi-model code review with preset-based analysis for PRs, tasks, and packages.
5
+
6
+ <img src="https://raw.githubusercontent.com/cs3b/ace/main/docs/brand/AgenticCodingEnvironment.Logo.XS.jpg" alt="ACE Logo" width="480">
7
+ <br><br>
8
+
9
+ <a href="https://rubygems.org/gems/ace-review"><img alt="Gem Version" src="https://img.shields.io/gem/v/ace-review.svg" /></a>
10
+ <a href="https://www.ruby-lang.org"><img alt="Ruby" src="https://img.shields.io/badge/Ruby-3.2+-CC342D?logo=ruby" /></a>
11
+ <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg" /></a>
12
+
13
+ </div>
14
+
15
+ > Works with: Claude Code, Codex CLI, OpenCode, Gemini CLI, pi-agent, and more.
16
+
17
+ [Getting Started](docs/getting-started.md) | [Usage Guide](docs/usage.md) | [Handbook - Skills, Agents, Templates](docs/handbook.md)
18
+
19
+ ![ace-review demo](docs/demo/ace-review-getting-started.gif)
20
+
21
+ `ace-review` runs focused, repeatable reviews with configurable presets and parallel model execution via [ace-llm](../ace-llm). Findings are captured as feedback items with a verify, apply, and resolve lifecycle so review outcomes stay actionable.
22
+
23
+ ## How It Works
24
+
25
+ 1. Select a review preset (code, security, docs, PR, or custom) and target (diff, file set, or PR number) via [`ace-review`](docs/usage.md).
26
+ 2. The review engine executes the prompt across one or more models through [ace-llm](../ace-llm), loading context from [ace-bundle](../ace-bundle) and diffs from [ace-git](../ace-git).
27
+ 3. Findings are synthesized into feedback items with a tracked lifecycle (draft, verified, pending, resolved, skipped) and saved as session artifacts.
28
+
29
+ ## Use Cases
30
+
31
+ **Review pull requests with consistent quality gates** - use `/as-review-pr` or [`ace-review --pr`](docs/usage.md) to run preset-driven reviews over PR diffs with optional GitHub comment publication.
32
+
33
+ **Run multi-model analysis in parallel** - execute the same review prompt across multiple [ace-llm](../ace-llm) providers, then synthesize overlapping and conflicting findings.
34
+
35
+ **Manage feedback as tracked work** - use `/as-review-verify-feedback` and `/as-review-apply-feedback` to move findings through draft, verified, pending, resolved, and skipped states, or use [`ace-review-feedback`](docs/usage.md) from the CLI to list, verify, apply, and resolve feedback items directly.
36
+
37
+ **Scope reviews to packages or tasks** - use `/as-review-package` for package-level analysis or connect reviews to [ace-task](../ace-task) workflows for task-scoped quality checks.
38
+
39
+ **Audit review history through session artifacts** - keep saved review sessions under `.ace-local/` for traceability, comparison, and handoff across contributors.
40
+
41
+ ---
42
+ [Getting Started](docs/getting-started.md) | [Usage Guide](docs/usage.md) | [Handbook - Skills, Agents, Templates](docs/handbook.md) | Part of [ACE](https://github.com/cs3b/ace)
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "minitest/test_task"
5
+
6
+ desc "Run tests using ace-test"
7
+ task :test do
8
+ sh "ace-test"
9
+ end
10
+
11
+ desc "Run tests directly (CI mode)"
12
+ Minitest::TestTask.create(:ci)
13
+
14
+ task default: :test
data/exe/ace-review ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # Ace Review - Automated review tool
5
+ #
6
+ # This executable provides review functionality for the ACE framework.
7
+ # It supports preset-based reviews with configurable focus areas using LLM analysis.
8
+
9
+ # Use absolute path resolution to support execution from any directory
10
+ lib_path = File.expand_path("../lib", __dir__)
11
+ $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
12
+
13
+ require "ace/review"
14
+ require "ace/support/cli"
15
+
16
+ # Pre-process array options before passing to ace-support-cli
17
+ # (ace-support-cli only captures the last occurrence of --subject/--model flags)
18
+ args = Ace::Review::CLI.preprocess_array_options(ARGV)
19
+ args = ["--help"] if args.empty?
20
+
21
+ # Start ace-support-cli single-command entrypoint with exception-based exit code handling (per ADR-023)
22
+ begin
23
+ Ace::Support::Cli::Runner.new(Ace::Review::CLI::Commands::Review).call(args: args)
24
+ rescue Ace::Support::Cli::Error => e
25
+ warn e.message
26
+ exit(e.exit_code)
27
+ end
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative "../lib/ace/review"
5
+ require_relative "../lib/ace/review/cli/feedback_cli"
6
+
7
+ # No args → show help
8
+ args = ARGV.dup
9
+ args = ["--help"] if args.empty?
10
+
11
+ # Start ace-support-cli with exception-based exit code handling (per ADR-023)
12
+ begin
13
+ Ace::Support::Cli::Runner.new(Ace::Review::FeedbackCLI).call(args: args)
14
+ rescue Ace::Support::Cli::Error => e
15
+ warn e.message
16
+ exit(e.exit_code)
17
+ end
@@ -0,0 +1,234 @@
1
+ ---
2
+ doc-type: guide
3
+ title: Code Review Process
4
+ purpose: Documentation for ace-review/handbook/guides/code-review-process.g.md
5
+ ace-docs:
6
+ last-updated: 2026-01-08
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # Code Review Process
11
+
12
+ ## Goal
13
+
14
+ This guide establishes the principles and high-level process for conducting comprehensive code reviews that cover code quality, testing, and documentation. It defines the systematic approach for ensuring code changes meet project standards and maintain consistency across all aspects of the codebase.
15
+
16
+ ## Overview
17
+
18
+ Effective code review ensures that changes meet quality standards across multiple dimensions: code quality, test coverage, and documentation accuracy. This guide provides a systematic approach to:
19
+
20
+ - Conduct comprehensive multi-focus reviews (code, tests, docs)
21
+ - Maintain consistency between implementation and documentation
22
+ - Apply consistent quality standards across all changes
23
+ - Generate actionable feedback with clear priorities
24
+
25
+ ## Core Principles
26
+
27
+ 1. **Multi-Dimensional Review**: Every change should be evaluated for code quality, test impact, and documentation consistency
28
+ 2. **Systematic Analysis**: Follow a structured process to ensure comprehensive coverage
29
+ 3. **Priority-Based Action**: Not all issues are equally urgent - focus on critical items first
30
+ 4. **Evidence-Based Decisions**: Reviews should provide specific, actionable feedback with clear rationale
31
+
32
+ ## The Code Review Process
33
+
34
+ ### Review Focus Areas
35
+
36
+ Code reviews should systematically evaluate three key dimensions:
37
+
38
+ **Code Quality Review**
39
+
40
+ - Architecture and design patterns
41
+ - Security and performance considerations
42
+ - Ruby/language best practices
43
+ - Code organization and maintainability
44
+
45
+ **Testing Review**
46
+
47
+ - Test coverage for new and modified functionality
48
+ - Test quality and maintainability
49
+ - Integration with existing test suite
50
+ - Performance test considerations
51
+
52
+ **Documentation Review**
53
+
54
+ - Impact on user-facing documentation
55
+ - Architecture decision records (ADRs)
56
+ - Code examples and API documentation
57
+ - Cross-reference integrity
58
+
59
+ ### Review Methodology
60
+
61
+ **Structured Analysis**
62
+
63
+ - Categorize changes by type (new features, modifications, breaking changes)
64
+ - Assess impact across all three focus areas
65
+ - Identify dependencies and cross-cutting concerns
66
+ - Document architectural decisions and trade-offs
67
+
68
+ **Multi-Model Approach**
69
+
70
+ - Leverage multiple AI models for comprehensive analysis
71
+ - Compare findings to identify consensus vs. unique insights
72
+ - Synthesize results into unified recommendations
73
+ - Validate findings against project standards
74
+
75
+ ### Priority Framework
76
+
77
+ Organize review findings by impact and urgency:
78
+
79
+ **🔴 Critical** (Must be done immediately)
80
+
81
+ - Security vulnerabilities or unsafe patterns
82
+ - Breaking changes affecting user workflows
83
+ - Logic errors or incorrect implementations
84
+
85
+ **🟡 High Priority** (Should be done soon)
86
+
87
+ - Significant architectural concerns
88
+ - Missing test coverage for critical paths
89
+ - User-facing documentation gaps
90
+
91
+ **🟢 Medium Priority** (Should be done eventually)
92
+
93
+ - Code quality improvements
94
+ - Test maintainability enhancements
95
+ - Documentation clarity improvements
96
+
97
+ **🔵 Low Priority** (Nice to have)
98
+
99
+ - Style and consistency improvements
100
+ - Performance optimizations
101
+ - Minor documentation updates
102
+
103
+ ### Implementation Approach
104
+
105
+ Effective code review produces actionable outcomes:
106
+
107
+ 1. **Specific Feedback**: Clear identification of issues with exact locations
108
+ 2. **Rationale**: Explanation of why changes are needed
109
+ 3. **Recommendations**: Concrete suggestions for improvement
110
+ 4. **Priority Guidance**: Clear indication of what to address first
111
+ 5. **Validation Criteria**: How to verify that issues are resolved
112
+
113
+ ## Review Tools and Automation
114
+
115
+ ### Unified Review Workflow
116
+
117
+ The project uses a structured review system that supports:
118
+
119
+ - **Multi-focus reviews**: Code, tests, and documentation in a single workflow
120
+ - **Flexible targets**: Git ranges, file patterns, or specific files
121
+ - **Contextual analysis**: Automatic project context loading
122
+ - **Multi-model execution**: Comparative analysis across different AI models
123
+ - **Structured output**: Organized session directories with synthesis capabilities
124
+
125
+ ### Review Execution
126
+
127
+ Reviews are executed through standardized commands that create organized sessions with input files, prompts, model reports, and synthesis results. The system handles both general code reviews and specialized handbook reviews with appropriate templates and context.
128
+
129
+ ## Integration with Development Workflow
130
+
131
+ ### Development Phases
132
+
133
+ **Pre-Development**
134
+
135
+ - Consider review scope and potential impact areas
136
+ - Plan for documentation and testing requirements
137
+ - Identify architectural decisions that will need documentation
138
+
139
+ **During Implementation**
140
+
141
+ - Make incremental commits that are easy to review
142
+ - Document design decisions as they are made
143
+ - Keep test coverage aligned with code changes
144
+
145
+ **Post-Implementation**
146
+
147
+ - Execute comprehensive reviews across all focus areas
148
+ - Address critical and high-priority findings
149
+ - Validate that all aspects meet project standards
150
+
151
+ ### Release Integration
152
+
153
+ **Pre-Release**
154
+
155
+ - Comprehensive review of all changes since last release
156
+ - Validation of documentation accuracy and completeness
157
+ - Synthesis of findings across multiple reviews
158
+
159
+ **Release Process**
160
+
161
+ - Final validation of critical issues resolution
162
+ - Documentation of breaking changes and migration paths
163
+ - Quality assurance checklist completion
164
+
165
+ ## Best Practices
166
+
167
+ ### Effective Review Execution
168
+
169
+ - **Scope appropriately**: Focus reviews on meaningful change sets
170
+ - **Provide context**: Include rationale for changes, not just implementation details
171
+ - **Be systematic**: Follow consistent process across all review types
172
+ - **Synthesize findings**: Combine multiple perspectives for comprehensive analysis
173
+ - **Act on results**: Prioritize and address findings systematically
174
+
175
+ ### Review Quality
176
+
177
+ - **Consistency**: Apply same standards across all changes
178
+ - **Completeness**: Cover all relevant aspects (code, tests, docs)
179
+ - **Actionability**: Provide specific, implementable recommendations
180
+ - **Validation**: Verify that addressed issues are actually resolved
181
+
182
+ ### Process Improvement
183
+
184
+ - **Learn from reviews**: Identify patterns in issues found
185
+ - **Refine standards**: Update review criteria based on experience
186
+ - **Automate where possible**: Leverage tools to improve efficiency
187
+ - **Track metrics**: Monitor review effectiveness and process health
188
+
189
+ ## Quality Standards
190
+
191
+ ### Review Completeness
192
+
193
+ - All critical and high-priority findings addressed
194
+ - Code changes align with architectural standards
195
+ - Test coverage adequate for risk level
196
+ - Documentation accurately reflects implementation
197
+
198
+ ### Code Quality
199
+
200
+ - Follows established patterns and conventions
201
+ - Security considerations appropriately addressed
202
+ - Performance implications considered
203
+ - Maintainability and readability optimized
204
+
205
+ ### Testing Standards
206
+
207
+ - Appropriate test coverage for change scope
208
+ - Tests are maintainable and reliable
209
+ - Integration with existing test suite verified
210
+ - Edge cases and error conditions covered
211
+
212
+ ### Documentation Standards
213
+
214
+ - User-facing changes properly documented
215
+ - Technical decisions recorded in ADRs
216
+ - Cross-references and examples updated
217
+ - Migration paths provided for breaking changes
218
+
219
+ ## Related Resources
220
+
221
+ ### Implementation Workflows
222
+
223
+ - [Review Code Workflow](../workflow-instructions/review-code.wf.md) - Detailed review execution process
224
+ - [Synthesize Reviews Workflow](../workflow-instructions/synthesize-reviews.wf.md) - Multi-report analysis
225
+
226
+ ### Standards and Guidelines
227
+
228
+ - [Documentation Guide](./documentation.g.md) - Documentation standards and practices
229
+ - [Quality Assurance Guide](./quality-assurance.g.md) - Overall quality standards
230
+ - [Version Control Git Guide](./version-control-system-git.g.md) - Git workflow integration
231
+
232
+ ---
233
+
234
+ *Effective code review is a cornerstone of software quality, ensuring that changes meet standards across code, tests, and documentation while maintaining long-term maintainability.*
@@ -0,0 +1,23 @@
1
+ # SECTION LIST ─ DO NOT CHANGE NAMES
2
+
3
+ ## 1. Executive Summary
4
+
5
+ ## 2. Architectural Compliance
6
+
7
+ ## 3. Best Practices Assessment
8
+
9
+ ## 4. Test Quality & Coverage
10
+
11
+ ## 5. Security Assessment
12
+
13
+ ## 6. API & Interface Review
14
+
15
+ ## 7. Detailed File-by-File Feedback
16
+
17
+ ## 8. Prioritised Action Items
18
+
19
+ ## 9. Performance Notes
20
+
21
+ ## 10. Risk Assessment
22
+
23
+ ## 11. Approval Recommendation
@@ -0,0 +1,60 @@
1
+ # Code Review System Prompt Base
2
+
3
+ You are a senior software engineer conducting a thorough code review.
4
+ Your task: perform a *structured* code review on the diff (or repo snapshot) supplied by the user.
5
+
6
+ ## Core Review Principles
7
+
8
+ Your review must be:
9
+ 1. **Constructive**: Focus on improvement, not criticism
10
+ 2. **Specific**: Provide exact locations and examples
11
+ 3. **Actionable**: Every issue should have a suggested fix
12
+ 4. **Educational**: Help the author learn best practices
13
+ 5. **Balanced**: Acknowledge both strengths and weaknesses
14
+
15
+ ## Review Approach
16
+
17
+ - Be specific with line numbers and file references
18
+ - Provide code examples for suggested improvements
19
+ - Explain the "why" behind your feedback
20
+ - Balance criticism with recognition of good work
21
+ - Consider the PR's scope and avoid scope creep
22
+ - Check for consistency with existing codebase patterns
23
+
24
+ ## Accuracy Requirements
25
+
26
+ **File Presence Verification:**
27
+ - Only flag a file as "missing" if you have evidence it was referenced but not included
28
+ - Do not assume files are missing based on partial context
29
+ - If uncertain about file presence, state "unable to verify" rather than claiming it's missing
30
+
31
+ **Diff-Based Review:**
32
+ - Review the *actual changed lines* in the diff, not inferred state
33
+ - Do not assume methods still exist or don't exist without seeing the changed code
34
+ - When a method call is in the diff, verify it's actually changed before flagging
35
+
36
+ **Scope Boundaries:**
37
+ - Changes outside the stated PR scope should be noted as "out of scope" observations, not code issues
38
+ - Configuration file changes (e.g., provider configs, CI settings) may be intentional; note without flagging
39
+ - Distinguish between "this is wrong" and "this is unrelated to the PR"
40
+
41
+ ## Severity Classification
42
+
43
+ Use consistent severity levels:
44
+ - **Critical/Blocking**: Breaks functionality, security vulnerability, data loss risk
45
+ - **High**: Significant bugs, performance regression, missing error handling
46
+ - **Medium**: Code quality issues, minor bugs, inconsistencies
47
+ - **Low**: Style issues, documentation gaps, suggestions for improvement
48
+
49
+ **Speculation vs Findings:**
50
+ - "Finding": Issue verified in the actual diff code
51
+ - "Suggestion": Improvement idea not tied to a specific bug
52
+ - "Future consideration": Speculative improvement for later - do NOT include in action items
53
+
54
+ ## Output Constraints
55
+
56
+ Output MUST follow the exact section order and Markdown anchors given below so that automated comparison scripts can parse it.
57
+ If a section has nothing to report, write "*No issues found*".
58
+
59
+ Tone: concise, professional, actionable.
60
+ Assume reviewers will aggregate multiple provider outputs; avoid personal opinions or references to other models.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: atom
3
+ description: ATOM architecture compliance review focus
4
+ last-updated: '2026-01-08'
5
+ ---
6
+
7
+ # ATOM Architecture Focus
8
+
9
+ ## Architectural Compliance (ATOM)
10
+
11
+ The project follows the ATOM architecture (Atoms → Molecules → Organisms → Ecosystem).
12
+
13
+ ### Review Requirements
14
+ - Verify ATOM pattern adherence across all layers
15
+ - Check component boundaries and responsibilities
16
+ - Assess dependency injection and testing patterns
17
+ - Validate separation of concerns
18
+ - Ensure proper layering: Atoms have no dependencies, Molecules depend only on Atoms, etc.
19
+
20
+ ### Critical Success Factors
21
+ - **Atoms**: Pure, stateless, single-responsibility units
22
+ - **Molecules**: Composable business logic components
23
+ - **Organisms**: Complex features combining molecules
24
+ - **Ecosystem**: Application-level orchestration
25
+
26
+ ### Common Issues to Check
27
+ - Atoms containing business logic (should be pure)
28
+ - Molecules with external dependencies (should use injection)
29
+ - Organisms directly accessing atoms (should go through molecules)
30
+ - Circular dependencies between layers
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: reflection
3
+ description: Architecture reflection focus for pre-PR self-assessment
4
+ last-updated: '2026-02-19'
5
+ ---
6
+
7
+ # Architecture Reflection Focus
8
+
9
+ ## Purpose
10
+
11
+ Self-assessment of implementation before PR creation. Categorize findings into actionable refactoring items vs. acceptable trade-offs.
12
+
13
+ ## Review Requirements
14
+
15
+ ### Over-Engineering Detection
16
+ - Unnecessary abstractions (helpers/utilities for one-time operations)
17
+ - Premature generalization (configurability nobody asked for)
18
+ - Feature flags or backward-compatibility shims when direct changes suffice
19
+ - Extra error handling for impossible scenarios
20
+ - Layers of indirection that add complexity without value
21
+
22
+ ### Missing Abstractions
23
+ - Repeated patterns across 3+ locations that should be extracted
24
+ - Inline logic that belongs in a dedicated atom or molecule
25
+ - Configuration values hardcoded in multiple places
26
+ - Shared behavior duplicated instead of composed
27
+
28
+ ### ATOM Layer Compliance
29
+ - Atoms must be pure, stateless, single-responsibility
30
+ - Molecules compose atoms with controlled side effects
31
+ - Organisms orchestrate molecules for business logic
32
+ - No layer-skipping (organisms should not directly use atoms)
33
+ - No circular dependencies between layers
34
+
35
+ ### Scope Discipline
36
+ - Changes stay within the task scope (no drive-by refactoring)
37
+ - No unrelated "improvements" bundled with the implementation
38
+ - Comments and docstrings only where logic is non-obvious
39
+
40
+ ## Output Format
41
+
42
+ Categorize each finding as one of:
43
+
44
+ ### Refactor (actionable, bounded)
45
+ Items that should be fixed before shipping. Each must be:
46
+ - Concrete (specific file and location)
47
+ - Bounded (completable in a single pass)
48
+ - Testable (won't break existing tests, or test changes are clear)
49
+
50
+ ### Accept (correct as-is)
51
+ Items reviewed and confirmed appropriate:
52
+ - Intentional trade-offs with clear reasoning
53
+ - Patterns that match project conventions
54
+ - Complexity justified by requirements
55
+
56
+ ### Skip (out of scope or too risky)
57
+ Items identified but deferred:
58
+ - Would require significant rework beyond task scope
59
+ - Risk of introducing regressions outweighs benefit
60
+ - Better addressed in a dedicated follow-up task
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: rails
3
+ description: Ruby on Rails framework review focus
4
+ last-updated: '2026-01-08'
5
+ ---
6
+
7
+ # Ruby on Rails Focus
8
+
9
+ ## Rails Framework Review
10
+
11
+ You are reviewing Ruby on Rails application code.
12
+
13
+ ### Rails Best Practices
14
+ - **MVC Pattern**: Proper separation of concerns
15
+ - **RESTful Design**: Resource-based routing
16
+ - **Active Record**: Query optimization and N+1 prevention
17
+ - **Security**: CSRF, SQL injection, XSS protection
18
+
19
+ ### Rails-Specific Areas
20
+ - **Controllers**: Thin controllers, proper filters
21
+ - **Models**: Business logic, validations, callbacks
22
+ - **Views**: Minimal logic, proper helpers
23
+ - **Routes**: RESTful conventions, constraints
24
+ - **Migrations**: Reversible, atomic changes
25
+ - **Jobs**: Background processing patterns
26
+ - **Mailers**: Email delivery and templates
27
+
28
+ ### Performance Considerations
29
+ - Database query optimization
30
+ - Caching strategies (fragment, Russian doll)
31
+ - Asset pipeline optimization
32
+ - Eager loading associations
33
+ - Background job processing
34
+
35
+ ### Testing Approach
36
+ - Request specs for integration
37
+ - Model specs for business logic
38
+ - System specs for user flows
39
+ - Proper use of factories
40
+ - Database cleaner strategies
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: vue-firebase
3
+ description: Vue 3 + Firebase platform review focus
4
+ last-updated: '2026-01-08'
5
+ ---
6
+
7
+ # Vue.js with Firebase Focus
8
+
9
+ ## Vue 3 & Firebase Platform Review
10
+
11
+ You are reviewing a Vue 3 Progressive Web App using Firebase platform (Firestore, Auth, Storage).
12
+
13
+ ### Vue.js 3 Best Practices
14
+ - **Component Architecture**: Composition API with `<script setup>`
15
+ - **State Management**: Pinia/Vuex patterns
16
+ - **Reactivity**: Efficient reactive data usage
17
+ - **Performance**: Bundle size, lazy loading, code splitting
18
+
19
+ ### Firebase Integration
20
+ - **Security Rules**: Firestore and Storage rules validation
21
+ - **Authentication**: Auth flow implementation and security
22
+ - **Data Modeling**: Firestore structure and query optimization
23
+ - **Offline Support**: Data synchronization strategies
24
+ - **Cloud Functions**: Serverless function patterns (if applicable)
25
+
26
+ ### PWA Compliance
27
+ - **Service Worker**: Implementation and caching strategies
28
+ - **App Manifest**: Configuration and icons
29
+ - **Offline Functionality**: Coverage and fallbacks
30
+ - **Core Web Vitals**: Performance metrics
31
+ - **Mobile Experience**: Touch interactions and responsiveness
32
+
33
+ ### Component Review
34
+ - Props and emits validation
35
+ - Component composition and reusability
36
+ - Event handling patterns
37
+ - Accessibility (a11y) compliance
38
+ - TypeScript usage (if applicable)
39
+
40
+ ### Security Considerations
41
+ - XSS and CSRF protection
42
+ - Input validation and sanitization
43
+ - Client-side data exposure
44
+ - API key and secret management
45
+ - Firebase Security Rules coverage
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: ruby
3
+ description: Ruby language review focus with idioms and best practices
4
+ last-updated: '2026-01-08'
5
+ ---
6
+
7
+ # Ruby Language Focus
8
+
9
+ ## Ruby-Specific Review Criteria
10
+
11
+ You are reviewing Ruby code with expertise in Ruby best practices and idioms.
12
+
13
+ ### Ruby Gem Best Practices
14
+ - Proper gem structure and organization
15
+ - Semantic versioning compliance
16
+ - Dependency management and version constraints
17
+ - README and documentation standards
18
+
19
+ ### Code Quality Standards
20
+ - **Style**: StandardRB compliance (note justified exceptions)
21
+ - **Idioms**: Ruby idioms and conventions
22
+ - **Performance**: Efficient use of Ruby features
23
+ - **Memory**: Proper object lifecycle management
24
+
25
+ ### Testing with Minitest
26
+ - Target: 90%+ test coverage
27
+ - Test organization and naming conventions (flat structure: test/atoms/, test/molecules/)
28
+ - Proper use of Minitest features (setup, teardown, assertions)
29
+ - Mock and stub usage appropriateness (use stub() for thread-safe test mocking)
30
+
31
+ ### Ruby-Specific Checks
32
+ - Proper use of blocks, procs, and lambdas
33
+ - Metaprogramming appropriateness
34
+ - Module and class design
35
+ - Exception handling patterns
36
+ - String interpolation vs concatenation
37
+ - Symbol vs string usage
38
+ - Enumerable method selection
39
+ - Proper use of attr_accessor/reader/writer
40
+
41
+ ### Ruby 3+ Features
42
+ Review for appropriate use of modern Ruby features:
43
+ - **Pattern Matching** (`case...in`): Prefer for complex destructuring, avoid for simple conditionals
44
+ - **Endless Methods** (`def method = expr`): Use for single-expression methods, keep readable
45
+ - **Numbered Block Parameters** (`_1`, `_2`): Use only for simple, short blocks
46
+ - **Hash Shorthand** (`{x:, y:}`): Use when variable name matches key name
47
+ - **Rightward Assignment** (`expr => var`): Use sparingly for destructuring results
48
+ - **Data Classes** (`Data.define`): Prefer over Struct for immutable value objects (requires Ruby 3.2+; project uses 3.4+)
49
+ - **Keyword Argument Forwarding** (`def foo(**) = bar(**)`)
50
+ - **Ractor**: Review thread-safety implications when used