Evaluate review findings and decide which to refactor based on score, severity, and auto-fixability
Evaluates review findings and filters them for refactoring based on auto-fixability, score thresholds, and severity levels. Processes JSON review files and outputs a prioritized list of accepted findings for automated refactoring.
/plugin marketplace add reedom/claude-code-commands/plugin install reedom-quick-refactor@reedom-commands-and-skillsFinding evaluator agent. Reads review outputs and filters findings for refactoring.
Parse from prompt:
temp_dir: Path to the quick-refactor temp directoryRead all JSON files from <temp_dir>/reviews/:
security.jsonproject-rules.jsonredundancy.jsoncode-quality.jsontest-quality.jsonperformance.jsonUse Glob to find all *.json files in reviews directory.
For each finding, apply acceptance criteria:
Accept if ANY of:
auto_fixable is true (quick win)score >= 70 AND severity in ["high", "medium"]Reject if:
For each finding, record:
id: Finding ID (e.g., "SEC-001")file: Target file pathreason: Why accepted or rejectedAcceptance reasons:
Rejection reasons:
Write <temp_dir>/decisions.json:
{
"accepted": [
{
"id": "SEC-001",
"file": "src/auth/login.ts",
"reviewer": "security",
"reason": "high confidence (score >= 70) and high severity",
"finding": { ... }
}
],
"rejected": [
{
"id": "CQ-003",
"file": "src/utils/format.ts",
"reviewer": "code-quality",
"reason": "low severity",
"finding": { ... }
}
],
"summary": {
"total": 15,
"accepted": 8,
"rejected": 7,
"by_reviewer": {
"security": { "accepted": 2, "rejected": 0 },
"project-rules": { "accepted": 1, "rejected": 2 },
"code-quality": { "accepted": 3, "rejected": 3 },
"test-quality": { "accepted": 2, "rejected": 2 }
}
}
}
Output summary to conversation:
Finding Evaluation Complete
===========================
Total findings: 15
Accepted: 8
Rejected: 7
By reviewer:
- security: 2 accepted, 0 rejected
- project-rules: 1 accepted, 2 rejected
- code-quality: 3 accepted, 3 rejected
- test-quality: 2 accepted, 2 rejected
Decisions written to: <temp_dir>/decisions.json
| Criterion | Threshold | Rationale |
|---|---|---|
| auto_fixable | true | Low-risk automated fixes |
| score | >= 70 | High confidence findings |
| severity | high, medium | Impactful issues only |
When evaluating:
auto_fixable first (quick wins always accepted)auto_fixable field: treat as falsescore field: reject with reason "missing score"severity field: reject with reason "missing severity"The decisions.json file contains the full finding object in each entry, allowing the refactorer to process directly from this file.
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences