- Move CLI + migration logic out of src/p2pkg/__main__.py into dedicated modules:
apply.py, cli.py, discovery.py, gitutils.py, plans.py, templates.py
- Add -k/--keep option to preserve legacy *.py files as forwarding stubs (default removes legacy)
- Implement Strategy A recursive discovery: only migrate *.py inside a runnable outermost package (__init__.py + __main__.py)
- Update tests to import new modules and build a Strategy A compatible package tree for recursive runs
https://chatgpt.com/share/69468609-0584-800f-a3e0-9d58210fb0e8
- Introduce MigrationPlan and refactor migration into plan/apply phases
- Add candidate filtering to avoid migrating package internals
- Support recursive directory mode (-R) with discovery + plan preview
- Add preview (-p) and force (-f) flags with y/N confirmation defaulting to NO
- Improve plan output with repo-root relative paths
- Expand unittests to cover non-recursive + recursive flows and prompting
https://chatgpt.com/share/69468609-0584-800f-a3e0-9d58210fb0e8