Academic foundations
Behavior-preserving refactoring
Opdyke, W. F. (1992) — Refactoring Object-Oriented Frameworks. PhD thesis, University of Illinois at Urbana-Champaign. The foundational thesis defining refactoring as a discipline of behavior-preserving transformation. Opdyke’s “preconditions” — properties that must hold before a transformation is safe — are the conceptual ancestor of Refactron’sprecondition records: every refusal carries an explicit reason rather than a silent skip.
PDF (UIUC IDEALS archive)
Tree-based program analysis
Brunsfeld, M. (2018) — Tree-sitter: a new parsing system for programming tools. Strange Loop 2018. The error-tolerant, incremental parser library Refactron uses for its detector layer. Tree-sitter is what makes “fast enough on a 100k-LOC codebase” attainable for the analyze step. Talk video · ProjectRefactoring-aware test selection
Wang, K., Buse, R. P. L., & Weimer, W. (2018) — Towards Refactoring-Aware Regression Test Selection. ICSE 2018. The insight that coverage of the changed surface — not just any-test-touched-this-file — is the right signal for which tests to re-run after a refactor. Influences Refactron’s blast-radius scoring:affectedTestFiles contributes 20% to the score and drives whether the test gate runs at all.
ACM DL
LLM code-quality baseline
Pearce, H. et al. (NYU, 2022) — Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions. The 89-scenario study of MITRE Top-25 CWEs that found ~40% of Copilot’s top suggestions contained an exploitable vulnerability. The empirical baseline behind Refactron’s “no LLM in the refactor path” decision — seewhy-no-llm.
arXiv:2108.09293
Open-source dependencies (transform foundations)
LibCST (Instagram Engineering)
The concrete syntax tree library that backs every Python transform sidecar. LibCST preserves whitespace, comments, and formatting exactly — which is why Refactron can rewrite a docstring without disturbing the rest of the file.- Project
- License: MIT
ts-morph (David Sherret)
The TypeScript Compiler API wrapper that backs every TypeScript transform. Gives Refactron type-aware refactoring (e.g.,indexof_to_includes only fires when the LHS is genuinely an array, not a string) without forking the TypeScript compiler.
- Project
- License: MIT
Ink (Vadim Demedes)
The React renderer for terminal output used by Refactron’s interactive TUI (refactron analyze, run --dry-run).
- Project
- License: MIT
write-file-atomic (npm)
The cross-platform atomic-write primitive Refactron’s batch writer wraps. Handles the POSIXrename(2) / Windows MoveFileEx differences so that every file write is either fully on disk or not at all.
- Project
- License: ISC
How to cite Refactron
If Refactron contributes to academic work, the suggested citation is:dev-docs/decisions/ are the canonical references.