This document outlines the step-by-step plan to migrate all version management, packaging, and release publication functionality from the main MarkiTect project into the `release-management` capability.
## 📋 Migration Overview
### Current State
Version management and release functionality is currently scattered across:
-`release.py` (main release script)
-`gitea/` directory (package registry client)
-`VERSION_MANAGEMENT.md` (documentation)
-`PACKAGE_PUBLISHING.md` (documentation)
- Makefile targets (release automation)
- setuptools-scm configuration in main `pyproject.toml`
### Target State
All release-related functionality consolidated into:
1.**Cleaner main project**: Release logic separated from core functionality
2.**Better maintainability**: Clear module boundaries and responsibilities
3.**Easier testing**: Isolated testing of release functionality
4.**Reduced complexity**: Main project focuses on core features
### For Release Management Capability
1.**Reusability**: Can be used in other Python projects
2.**Independent development**: Own release cycle and versioning
3.**Comprehensive testing**: Full test coverage for release functionality
4.**Documentation**: Dedicated documentation and examples
5.**Extensibility**: Easy to add new registries and features
### For Users/Developers
1.**Consistent interface**: Same commands across all projects using capability
2.**Better documentation**: Comprehensive guides and API reference
3.**More features**: Enhanced functionality and registry support
4.**Easier contribution**: Clear structure for adding features
## 🎯 Success Criteria
Migration is considered successful when:
1. ✅ All existing release functionality works through capability
2. ✅ Main project Makefile targets work unchanged
3. ✅ CLI commands provide same functionality as current `release.py`
4. ✅ All tests pass for both capability and main project
5. ✅ Documentation is complete and accurate
6. ✅ Examples demonstrate capability usage
7. ✅ No regression in release workflow functionality
## 🔄 Rollback Plan
If migration issues arise:
1.**Keep backup**: Current files backed up before migration
2.**Incremental approach**: Migrate one component at a time
3.**Parallel operation**: Keep old and new systems running during transition
4.**Quick revert**: Ability to restore original structure if needed
**Rollback Steps:**
1. Remove capability dependency from main `pyproject.toml`
2. Restore backed up files (`release.py`, `gitea/`, docs)
3. Restore original Makefile targets
4. Remove capability directory
5. Test that original functionality works
## 📅 Migration Timeline
**Estimated Duration:** 1-2 weeks for complete migration
**Phase Breakdown:**
- **Phase 1 (Directory Structure):** ✅ COMPLETED
- **Phase 2 (Code Migration):** 2-3 days
- **Phase 3 (Integration):** 1-2 days
- **Phase 4 (Testing):** 2-3 days
- **Phase 5 (Documentation):** 1-2 days
**Critical Path:**
1. Code refactoring and migration
2. Testing and validation
3. Documentation updates
4. Final integration testing
This migration plan ensures a systematic, low-risk transition to the capability-based architecture while maintaining all existing functionality and improving the overall project structure.