Refactor monolithic create command into clean subpackage architecture with specialized modules #573
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Decompose the 732-line create.py into a 1,589-line subpackage with 12 focused modules that each handle specific responsibilities. This refactoring improves maintainability, testability, and code clarity while preserving all existing functionality.
Architecture
New Module Organization
regular.py- Standard worktree with optional branch creationfrom_current_branch.py- Move current branch to new worktreefrom_branch.py- Create worktree from existing branchplan.py- Create from plan file with .plan/ folder setupwith_dot_plan.py- Copy .plan/ folder from source workstackKey Design Improvements
Files Changed
Added (13 files)
create/__init__.py- Package exportscreate/types.py- Data structurescreate/orchestrator.py- CLI orchestrationcreate/validation.py- Input validationcreate/worktree_ops.py- Git operationscreate/output.py- Output formattingcreate/post_creation.py- Post-create handlingcreate/variants/__init__.py- Variants packagecreate/variants/regular.py- Regular creationcreate/variants/from_current_branch.py- Move branchcreate/variants/from_branch.py- From existing branchcreate/variants/plan.py- Plan file creationcreate/variants/with_dot_plan.py- .plan/ folder copyingDeleted (1 file)
create.py- Original monolithic commandModified (10 files)
jump.py,rename.py- Import path updates.github/workflows/*- Git attribute normalizationkit.yaml- Devrun hook updatesCritical Notes