RefactorPlatform
An Open-Source Harness for Controlled Evaluation of Repository-Scale Refactoring Agents
1Pi School, 2Translated
EMNLP 2026 · System Demonstrations
*Equal contribution.
Abstract
An open-source evaluation harness for repository-scale refactoring agents. It holds the execution environment fixed and varies one design axis at a time — model backbone, execution regime (baseline, retrieval-augmented, multi-agent), retrieval chunking strategy, and prompt specificity — with per-task isolated workspaces, live terminal streaming, token and diff telemetry, AST-based verification for Python, and compilation, test and RefactoringMiner gates for Java.
Results
(qwen3.6-flash, S2 AST retrieval)
| Model | S1 Baseline | S2 + AST Retrieval |
|---|---|---|
| qwen3.6-flash | 73% | 86% |
| minimax-m3 | 75% | 81% |
| kimi-k2.6 | 71% | 78% |
| deepseek-v4-pro | 77% | 89% |
A single lean retrieval-augmented agent (86%) also outperforms the one orchestrated multi-agent topology evaluated (77%, S3, Copilot sub-agents), and retrieval's accuracy gains absorb its token overhead: cost per successful refactoring shifts by no more than $0.01 across all four models. See the paper for the full ablation, cost-efficiency, and Java (SWE-Refactor) results.
Structural retrieval
AST-aware chunking sits alone on the purity/integrity frontier that naive fixed-line windows only approach at much larger window sizes.
Prompt sensitivity
AST-chunk retrieval leads at every prompt specificity level; naive line-window retrieval trails even the no-retrieval baseline.
Cross-model gains
AST-aware retrieval improves pass rate for every model family evaluated, not just the flagship backbone.
SWE-Refactor verification
Java is held to a triple gate: code extraction, structural detection, and a green build and test suite, applied in sequence.
BibTeX
@inproceedings{refactorplatform2026,
title = {RefactorPlatform: An Open-Source Harness for Controlled Evaluation of Repository-Scale Refactoring Agents},
author = {Ben Amor, Aziz and Mali, Drish and Acharya, Mann and Iyer, Vijayasri and Bratières, Sébastien},
booktitle = {Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: System Demonstrations},
publisher = {Association for Computational Linguistics},
year = {2026}
}