## Database Command Reorganization
- Add new db-prefixed commands: db-query, db-schema, db-delete, db-status
- Maintain backward compatibility with deprecation warnings for query/schema commands
- Implement lazy database initialization to reduce CLI coupling
- Add command-specific --database options for flexibility
## Legacy Compatibility Framework
- Create comprehensive legacy compatibility system in markitect/legacy_compat.py
- Support versioned legacy switches (--legacy-v39-pre) for smooth transitions
- Implement git commit binding for version tracking (Issue #39: v39-pre → 3168de4)
- Add environment-based legacy mode detection for test environments
- Create graduated deprecation warning system (DEPRECATED → LEGACY → SUNSET)
## Legacy Agent System
- Implement intelligent legacy lifecycle management agent
- Add 8 CLI commands for legacy interface management (status, analyze, migrate, cleanup, etc.)
- Create automated maintenance with usage analytics and data-driven decisions
- Provide comprehensive safety features with backup and rollback capabilities
## Test Architecture Enhancement
- Add 18 comprehensive tests for Issue #39 functionality (16 passing, 2 skipped by design)
- Configure pytest.ini with MARKITECT_LEGACY_MODE=39-pre for automatic legacy support
- Update test count to 466 total tests across 7 architectural layers
- Identify 5 legacy interface tests for future recreation without legacy dependencies
## Documentation & Roadmap Updates
- Update NEXT.md with completed Issues #39 and #40
- Document failing tests requiring recreation with pure db- commands
- Add comprehensive legacy agent documentation
- Update development priorities and capability descriptions
## Architecture Achievements
- Simplified CLI architecture with reduced coupling between commands and global state
- Created reusable legacy compatibility framework for future breaking changes
- Established systematic approach to interface deprecation and migration
- Maintained 461/466 tests passing (5 legacy interface tests flagged for recreation)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
54 lines
1.6 KiB
Python
54 lines
1.6 KiB
Python
"""
|
|
Legacy compatibility system exceptions.
|
|
|
|
Provides specialized exception classes for legacy system operations.
|
|
"""
|
|
|
|
class LegacyError(Exception):
|
|
"""Base exception for legacy compatibility system."""
|
|
pass
|
|
|
|
|
|
class LegacyVersionNotFoundError(LegacyError):
|
|
"""Raised when a requested legacy version is not available."""
|
|
|
|
def __init__(self, command: str, version: str, available_versions: list = None):
|
|
self.command = command
|
|
self.version = version
|
|
self.available_versions = available_versions or []
|
|
|
|
msg = f"Legacy version '{version}' not found for command '{command}'"
|
|
if self.available_versions:
|
|
msg += f". Available versions: {', '.join(self.available_versions)}"
|
|
|
|
super().__init__(msg)
|
|
|
|
|
|
class DeprecationError(LegacyError):
|
|
"""Raised when deprecated functionality is accessed inappropriately."""
|
|
|
|
def __init__(self, feature: str, deprecated_in: str, removal_date: str = None):
|
|
self.feature = feature
|
|
self.deprecated_in = deprecated_in
|
|
self.removal_date = removal_date
|
|
|
|
msg = f"Feature '{feature}' was deprecated in version {deprecated_in}"
|
|
if removal_date:
|
|
msg += f" and will be removed in {removal_date}"
|
|
|
|
super().__init__(msg)
|
|
|
|
|
|
class LegacyConfigurationError(LegacyError):
|
|
"""Raised when legacy system configuration is invalid."""
|
|
pass
|
|
|
|
|
|
class GitStateError(LegacyError):
|
|
"""Raised when git state operations fail."""
|
|
pass
|
|
|
|
|
|
class CompatibilityError(LegacyError):
|
|
"""Raised when compatibility layer operations fail."""
|
|
pass |