- MovePlan gains moves[] (file move = 1 relocation), left_behind[] for
unindexable files that deliberately stay, prune_dirs[] applied after the
batch (remove_dir only succeeds when empty, leftovers keep their home)
- plan::dir: nesting/target-exists guards, merged per-file rewrites
- apply: atomic N-rename batch (per-file git mv), rollback restores every
move, rewrite and created dir newest-first
- mv_reject accepts dirs; --json adds moved_files/would_move_files only for
real dir moves (single-file contract byte-identical); summary shows
(N files) and left-behind count
- engine rollback/prune tests moved to tests/apply.rs (public API; a
mid-batch failure cannot be forced through the CLI), java-rule e2e split
into its own binary to keep every file under the 250-line budget
- binds names via tree-sitter (default, namespace, named + alias, type-only),
keeps a statement when ANY bound name occurs outside it (word scan over
comments/strings included): under-delete is the safe direction, mirroring
the Java rule's asymmetry
- ESM caveat encoded in the policy: mixed live/dead statements are not
touched — removing a specifier would still drop the module's side effects
- side-effect imports and 'export .. from' re-exports are never candidates
- parser/ts became a folder (mod/extract/unused_imports) to keep the
4-entries-per-module rule; word_occurs shared via crate::parser
- java/rules/unused_imports now reuses the shared word scanner (DRY)