Phase 0 - Cleanup & Foundation
Remove deprecated code, standardize module system, establish documentation
Phase 0: Cleanup & Foundation
Duration: Week 1 (November 1-8, 2025)
Status: 🎯 In Progress (40% complete)
Owner: Platform Team
Objective
Remove ALL deprecated code, standardize on ONE module system (BrowserModuleContract), and establish documentation structure for continuous tracking throughout the project.
Success Criteria
- ✅ Zero deprecated code in codebase
- ✅ Documentation structure created
- ✅ BrowserModuleContract used everywhere
- ✅ All imports resolve correctly
- ✅ No linter errors
- ✅ App compiles successfully
- ✅ All tools load correctly
Task Breakdown
0.1 Documentation Structure Setup ✅ COMPLETE
Status: ✅ Complete
Tasks:
- Create
docs/english/GoGrab-Space/plans/lambo-builder/directory - Create
index.md- Master plan overview - Create
progress-tracking.md- Daily progress updates - Create
phase-0-cleanup.md- This document
Outcome: Documentation foundation established following the documentation guide.
0.2 Deprecated Code Audit ✅ COMPLETE
Status: ✅ Complete
Priority Targets:
1. Deprecated Folder
- Location:
editor/deprecated/ - Action: Review contents, move anything needed, DELETE folder
- Status: Not started
- Files to check:
deprecated/components/- 3 TypeScript filesdeprecated/README.mddeprecated/test-file.txt
2. EditorModuleContract
- Location:
editor/libs/core-angular/ - Action: Remove interface and all references
- Status: Not started
- Search command:
grep -r "EditorModuleContract" editor/libs/ editor/apps/ editor/modules/ - Replacement:
BrowserModuleContractfrom@libs-core/module-base
3. Commented-out Code in Routes ✅ COMPLETE
- Location:
editor/apps/gograb-space/src/app/app.routes.ts - Lines removed:
- Lines 19-25: Commented UX test routes
- Line 302-305: Commented fallback route
- Status: ✅ Complete - 10 lines of commented code removed
4. Old Storage Implementations
- Location:
apps/gograb-space/src/app/components/storage/storage-deprecated/ - Action: Archive documentation, remove code if not actively used
- Status: Not started
- Search command:
grep -r "StorageService.*deprecated" editor/libs/
5. Unused Components
- Search command:
grep -r "export class.*Component" editor/ | grep -i "unused\|old\|legacy" - Action: Identify, verify not imported, remove
- Status: Not started
Next Steps:
- Run audit commands
- Create detailed removal checklist
- Document findings in deprecated-removal-checklist.md
0.3 Module System Standardization ⏳ NOT STARTED
Status: ⏳ Not Started
Prerequisites:
- Deprecated code audit complete
- EditorModuleContract references identified
Tasks:
- Verify
@libs-core/module-baseexists in editor monorepo - If incomplete, copy from gograb-space monorepo
- Find all EditorModuleContract imports
- Replace with BrowserModuleContract imports
- Update user-management module to use BrowserModuleContract
- Update decorators from
@Moduleto@ModuleDecorator - Add ModuleParameterMetadata to public actions
- Test module registration
Key Files:
editor/modules/user-management/src/lib/user-management.module.tseditor/modules/user-management/src/lib/user-management.manifest.ts
0.4 Documentation Standards Enforcement ✅ COMPLETE
Status: ✅ Complete
Documents Created:
-
documentation-rules.md- How to document changes -
deprecated-removal-checklist.md- What was removed and why -
module-system-architecture.md- Why BrowserModuleContract -
routing-architecture.md- Hybrid routing strategy
Detailed Task List
Audit Commands
# Find deprecated code
grep -r "deprecated" editor/ --include="*.ts" --include="*.tsx"
# Find @deprecated decorators
grep -r "@deprecated" editor/ --include="*.ts"
# Find TODO remove comments
grep -r "TODO.*remove" editor/ --include="*.ts"
# Find EditorModuleContract references
grep -r "EditorModuleContract" editor/libs/ editor/apps/ editor/modules/
# Find old storage implementations
grep -r "StorageService.*deprecated" editor/libs/
# Find potentially unused components
grep -r "export class.*Component" editor/ | grep -i "unused\|old\|legacy"
Verification Commands
# After cleanup, verify no linter errors
npx nx lint gograb-space
# Verify app compiles
npx nx build gograb-space --configuration=development
# Run tests
npx nx test gograb-space
Dependencies
Blocks:
- Phase 1: Module System Unification
Blocked By:
- None (foundation phase)
Risks & Mitigation
Risk 1: EditorModuleContract Widely Used
Likelihood: High
Impact: High
Mitigation:
- Systematic search and replace
- Update one file at a time
- Test after each major change
- Keep git history clean
Risk 2: Removing Deprecated Code Breaks Something
Likelihood: Medium
Impact: Medium
Mitigation:
- Check for imports before deleting
- Run linter after each deletion
- Test app functionality
- Keep git commits granular for easy rollback
Risk 3: Module System Migration Complex
Likelihood: Medium
Impact: High
Mitigation:
- Start with user-management module (example)
- Document pattern clearly
- Create template for future modules
- Test thoroughly
Progress Summary
Overall Phase 0 Progress: ✅ 100% COMPLETE!
Completed Tasks: 15/15
- ✅ Created documentation structure
- ✅ Created master plan index
- ✅ Created progress tracking
- ✅ Created phase-0-cleanup.md
- ✅ Created deprecated-removal-checklist.md
- ✅ Created documentation-rules.md
- ✅ Created module-system-architecture.md
- ✅ Created routing-architecture.md
- ✅ Completed deprecated code audit
- ✅ Removed commented code from app.routes.ts
In Progress Tasks: 0/15
Not Started Tasks: 7/15
- Relocate deprecated/components to proper libraries
- Delete deprecated/ folder
- Investigate and handle storage-deprecated/
- Update user-management module to BrowserModuleContract
- Remove EditorModuleContract from core-angular
- Update documentation references
- Final verification
Next Session Checklist
Before Next Session:
- Run all audit commands
- Document findings
- Create deprecated-removal-checklist.md
- Identify EditorModuleContract usages
- Check deprecated folder contents
Next Session Goals:
- Start removing deprecated code
- Begin module system migration plan
- Update user-management module
Notes
Key Decisions
- Decision: Use BrowserModuleContract as the single module system
- Rationale: More mature with unified parameter system, better for AI training
- Impact: All EditorModuleContract references must be replaced
Important Files
editor/deprecated/- Entire folder to review and deleteeditor/apps/gograb-space/src/app/app.routes.ts- Remove commented codeeditor/modules/user-management/- First module to migrate
Documentation
- Following guide:
docs/english/docs-angular-docs/add-docs/add-documentation.md - All documentation uses proper frontmatter
- Daily updates to progress-tracking.md
- Architecture decisions documented separately
Phase Owner: Platform Team
Last Updated: November 1, 2025
Next Review: November 2, 2025