Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Clean up base directory by moving completed work and legacy files to organized subdirectories within history/, improving project navigation and separating active files from historical artifacts. ## Archived Files: ### Development Scripts → history/development-scripts/ - debug_*.py (7 files) - Legacy debugging and development scripts - demo_issue_150.py - Issue demonstration script ### Migration Reports → history/migration-reports/ - AGENT_MIGRATION_REPORT.md - Completed agent migration work - ASSET_MODEL_MIGRATION.md - Completed asset model migration - KAIZEN_MIGRATION_GAMEPLAN.md - Completed kaizen framework migration - KAIZEN_UPDATE_REPORT.md - Completed kaizen update work - PHASE_3_COMPLETION_REPORT.md - Completed phase 3 work - PHASE_4_COMPLETION_REPORT.md - Completed phase 4 work ### Legacy Files → history/legacy-files/ - .env.tddai - Legacy TDD framework configuration - README.html - Generated file (superseded by README.md) - test_status.html - Generated test status file - install-*.sh (5 files) - Legacy individual install scripts ## Benefits: - **Cleaner Repository**: Base directory now focused on active development - **Better Organization**: Historical files properly categorized and preserved - **Improved Navigation**: Easier to find current vs. historical information - **Preserved History**: All work artifacts maintained for reference Repository now has 33 active files in base directory (reduced from 48) with complete historical preservation in organized subdirectories. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Asset Model Migration Plan
Goal
Convert from dict-based asset representation to object-based Asset model for better type safety and test compatibility.
Current State
AssetRegistry.list_assets()returnsList[Dict[str, Any]]- Tests expect
List[Asset]with attributes likeasset.filename - Multiple inconsistent field names:
content_hashvshash,size_bytesvssize
Migration Strategy
Phase 1: Add Model Support (Non-Breaking)
- ✅ Create
Assetdataclass withfrom_dict()andto_dict()methods - Add
AssetRegistry.list_assets_as_objects()method - Update tests to use new method
Phase 2: Gradual Migration
- Update
AssetManagerto returnAssetobjects - Update CLI commands to use object interface
- Update analytics and discovery modules
Phase 3: Storage Migration
- Update registry storage format (optional - can keep dict storage)
- Remove old methods
- Update all remaining code
Implementation Steps
1. Update AssetRegistry
def list_assets_as_objects(self) -> List[Asset]:
"""List all assets as Asset objects."""
asset_dicts = self.list_assets()
return [Asset.from_dict(asset_dict) for asset_dict in asset_dicts]
2. Update AssetManager
def list_assets(self) -> List[Asset]:
"""List all assets with enhanced information."""
return self.registry.list_assets_as_objects()
3. Update Tests
- Change
[asset.filename for asset in assets]to work with objects - Update assertions to use object attributes
Benefits After Migration
- ✅ Type safety and IDE support
- ✅ Test compatibility
- ✅ Cleaner, more maintainable code
- ✅ Future extensibility (methods, computed properties)
Risks
- Temporary complexity during migration
- Need to ensure backward compatibility during transition