Package layout
The published npm package is primarily therefactron CLI (dist/cli/index.js). The same build outputs library modules under dist/ (for example dist/core/models.js, dist/core/orchestrator.js).
If you embed Refactron programmatically, import from the compiled paths your bundler resolves (check package.json exports for supported entry points in your version).
Core layers
| Layer | Role |
|---|---|
| Models | CodeIssue, BlastRadius, VerificationResult, AnalysisResult, pipeline types — see Models |
| Orchestrator | Wires analysis → autofix → verification → backup → atomic write — see Orchestrator |
| Adapters | ILanguageAdapter for language-specific analyze/transform/verify — see Adapters |
| Session (CLI) | WorkSessionManager persists REPL sessions under .refactron/work-sessions/ |
Stability
Types undersrc/core/models.ts and src/adapters/interface.ts are marked LOCKED in-repo: treat them as semver-sensitive when depending on them from outside the project.
See also
- Core concepts — Blast radius and verification behavior
