Files
proxmox/docs/archive/00-meta-pruned/SCRIPT_REDUCTION_IMPLEMENTATION_TASKS.md
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

306 lines
12 KiB
Markdown

# Script Reduction Implementation - Complete Task List
**Last Updated:** 2026-01-31
**Document Version:** 1.0
**Status:** Active Documentation
---
**Date:** 2026-01-22
**Goal:** Reduce 756 scripts to 460-560 scripts (25-40% reduction)
**Status:** ✅ Complete (141/141 tasks — 2026-01-22)
---
## Overview
**Current:** 756 active scripts
**Target:** 460-560 scripts
**Reduction:** 200-300 scripts (25-40%)
---
## Phase 1: Framework Creation
### Task 1.1: Create Verification Framework
- [x] **1.1.1** Design `verify-all.sh` interface and parameters
- [x] **1.1.2** Create `scripts/verify-all.sh` with component/type parameters
- [x] **1.1.3** Implement service verification functions
- [x] **1.1.4** Implement network verification functions
- [x] **1.1.5** Implement configuration verification functions
- [x] **1.1.6** Implement container/VM verification functions
- [x] **1.1.7** Add help/usage documentation
- [x] **1.1.8** Test with existing verification scripts
- [x] **1.1.9** Create migration guide for verify-*.sh scripts
**Target:** Consolidate 124 check/verify/validate scripts → 25-50 scripts
### Task 1.2: Create Listing Framework
- [x] **1.2.1** Design `list.sh` interface and parameters
- [x] **1.2.2** Create `scripts/list.sh` with type/filter parameters
- [x] **1.2.3** Implement VM listing functions
- [x] **1.2.4** Implement container listing functions
- [x] **1.2.5** Implement service listing functions
- [x] **1.2.6** Implement network listing functions
- [x] **1.2.7** Implement configuration listing functions
- [x] **1.2.8** Add filtering and sorting options
- [x] **1.2.9** Add help/usage documentation
- [x] **1.2.10** Test with existing list/show/get scripts
- [x] **1.2.11** Create migration guide for list-*.sh scripts
**Target:** Consolidate 18 list/show/get scripts → 2-5 scripts
### Task 1.3: Create Fix Framework
- [x] **1.3.1** Design `fix-all.sh` interface and parameters
- [x] **1.3.2** Create `scripts/fix-all.sh` with issue-type/component parameters
- [x] **1.3.3** Implement service fix functions
- [x] **1.3.4** Implement network fix functions
- [x] **1.3.5** Implement configuration fix functions
- [x] **1.3.6** Implement container fix functions
- [x] **1.3.7** Implement permission fix functions
- [x] **1.3.8** Add dry-run mode
- [x] **1.3.9** Add help/usage documentation
- [x] **1.3.10** Test with existing fix-*.sh scripts
- [x] **1.3.11** Create migration guide for fix-*.sh scripts
**Target:** Consolidate 93 fix scripts → 30-50 scripts
### Task 1.4: Create Configuration Framework
- [x] **1.4.1** Design `configure.sh` interface and parameters
- [x] **1.4.2** Create `scripts/configure.sh` with component/action parameters
- [x] **1.4.3** Implement service configuration functions
- [x] **1.4.4** Implement network configuration functions
- [x] **1.4.5** Implement container configuration functions
- [x] **1.4.6** Implement SSL/certificate configuration functions
- [x] **1.4.7** Implement nginx configuration functions
- [x] **1.4.8** Add validation and rollback capabilities
- [x] **1.4.9** Add help/usage documentation
- [x] **1.4.10** Test with existing configure-*.sh scripts
- [x] **1.4.11** Create migration guide for configure-*.sh scripts
**Target:** Consolidate 41 config scripts → 12-20 scripts
### Task 1.5: Create Deployment Framework
- [x] **1.5.1** Design `deploy.sh` interface and parameters
- [x] **1.5.2** Create `scripts/deploy.sh` with component/options parameters
- [x] **1.5.3** Implement service deployment functions
- [x] **1.5.4** Implement container deployment functions
- [x] **1.5.5** Implement infrastructure deployment functions
- [x] **1.5.6** Implement phased deployment support
- [x] **1.5.7** Add validation and rollback capabilities
- [x] **1.5.8** Add help/usage documentation
- [x] **1.5.9** Test with existing deploy/setup/install scripts
- [x] **1.5.10** Create migration guide for deploy-*.sh scripts
**Target:** Consolidate 102 deploy/setup/install scripts → 40-60 scripts
---
## Phase 2: Script Migration to Frameworks
### Task 2.1: Migrate Verification Scripts
- [x] **2.1.1** Analyze all 124 check/verify/validate scripts
- [x] **2.1.2** Categorize by verification type (service, network, config, etc.)
- [x] **2.1.3** Map each script to verify-all.sh parameters
- [x] **2.1.4** Create migration script to update references
- [x] **2.1.5** Test migrated scripts work with framework
- [x] **2.1.6** Archive original scripts to `archive/consolidated/verify/`
- [x] **2.1.7** Update documentation references
- [x] **2.1.8** Verify no broken references
**Target:** 124 scripts → 25-50 scripts
### Task 2.2: Migrate Listing Scripts
- [x] **2.2.1** Analyze all 18 list/show/get scripts
- [x] **2.2.2** Categorize by listing type (VMs, containers, services, etc.)
- [x] **2.2.3** Map each script to list.sh parameters
- [x] **2.2.4** Create migration script to update references
- [x] **2.2.5** Test migrated scripts work with framework
- [x] **2.2.6** Archive original scripts to `archive/consolidated/list/`
- [x] **2.2.7** Update documentation references
- [x] **2.2.8** Verify no broken references
**Target:** 18 scripts → 2-5 scripts
### Task 2.3: Migrate Fix Scripts
- [x] **2.3.1** Analyze all 93 fix-*.sh scripts
- [x] **2.3.2** Categorize by fix type (service, network, config, permissions, etc.)
- [x] **2.3.3** Map each script to fix-all.sh parameters
- [x] **2.3.4** Create migration script to update references
- [x] **2.3.5** Test migrated scripts work with framework
- [x] **2.3.6** Archive original scripts to `archive/consolidated/fix/`
- [x] **2.3.7** Update documentation references
- [x] **2.3.8** Verify no broken references
**Target:** 93 scripts → 30-50 scripts
### Task 2.4: Migrate Configuration Scripts
- [x] **2.4.1** Analyze all 41 configure/config scripts
- [x] **2.4.2** Categorize by configuration type (service, network, SSL, nginx, etc.)
- [x] **2.4.3** Map each script to configure.sh parameters
- [x] **2.4.4** Create migration script to update references
- [x] **2.4.5** Test migrated scripts work with framework
- [x] **2.4.6** Archive original scripts to `archive/consolidated/config/`
- [x] **2.4.7** Update documentation references
- [x] **2.4.8** Verify no broken references
**Target:** 41 scripts → 12-20 scripts
### Task 2.5: Migrate Deployment Scripts
- [x] **2.5.1** Analyze all 102 deploy/setup/install scripts
- [x] **2.5.2** Categorize by deployment type (service, container, infrastructure, etc.)
- [x] **2.5.3** Map each script to deploy.sh parameters
- [x] **2.5.4** Create migration script to update references
- [x] **2.5.5** Test migrated scripts work with framework
- [x] **2.5.6** Archive original scripts to `archive/consolidated/deploy/`
- [x] **2.5.7** Update documentation references
- [x] **2.5.8** Verify no broken references
**Target:** 102 scripts → 40-60 scripts
---
## Phase 3: Small Script Merging
### Task 3.1: Analyze Small Scripts
- [x] **3.1.1** Identify all scripts < 50 lines (63 scripts)
- [x] **3.1.2** Group by functionality (utilities, helpers, one-liners, etc.)
- [x] **3.1.3** Identify merge candidates
- [x] **3.1.4** Create merge plan for each group
### Task 3.2: Create Utility Scripts
- [x] **3.2.1** Create `scripts/utils/container-utils.sh` for container helpers
- [x] **3.2.2** Create `scripts/utils/network-utils.sh` for network helpers
- [x] **3.2.3** Create `scripts/utils/service-utils.sh` for service helpers
- [x] **3.2.4** Create `scripts/utils/config-utils.sh` for config helpers
- [x] **3.2.5** Create `scripts/utils/proxmox-utils.sh` for Proxmox helpers
### Task 3.3: Merge Small Scripts
- [x] **3.3.1** Merge container-related small scripts into container-utils.sh
- [x] **3.3.2** Merge network-related small scripts into network-utils.sh
- [x] **3.3.3** Merge service-related small scripts into service-utils.sh
- [x] **3.3.4** Merge config-related small scripts into config-utils.sh
- [x] **3.3.5** Merge Proxmox-related small scripts into proxmox-utils.sh
- [x] **3.3.6** Archive original small scripts
- [x] **3.3.7** Update references to use utility functions
**Target:** 63 scripts → 30-45 scripts
---
## Phase 4: Duplicate Consolidation
### Task 4.1: Identify Duplicates
- [x] **4.1.1** Run duplicate identification script
- [x] **4.1.2** Review duplicate analysis report
- [x] **4.1.3** Compare duplicate scripts side-by-side
- [x] **4.1.4** Identify best version of each duplicate
- [x] **4.1.5** Document consolidation decisions
### Task 4.2: Consolidate Duplicates
- [x] **4.2.1** Keep best version of each duplicate group
- [x] **4.2.2** Archive duplicate versions
- [x] **4.2.3** Update all references to point to kept version
- [x] **4.2.4** Verify no broken references
- [x] **4.2.5** Update documentation
**Target:** 50-100 scripts → consolidated
---
## Phase 5: Final Cleanup
### Task 5.1: Remove Obsolete Scripts
- [x] **5.1.1** Identify scripts not used in 6+ months
- [x] **5.1.2** Verify scripts are truly obsolete
- [x] **5.1.3** Archive obsolete scripts
- [x] **5.1.4** Update documentation
### Task 5.2: Update All References
- [x] **5.2.1** Search for references to archived scripts
- [x] **5.2.2** Update documentation references
- [x] **5.2.3** Update README files
- [x] **5.2.4** Update any automation that calls scripts
### Task 5.3: Final Verification
- [x] **5.3.1** Count final script total (should be 460-560)
- [x] **5.3.2** Verify all frameworks work correctly
- [x] **5.3.3** Test critical scripts still function
- [x] **5.3.4** Verify no broken references
- [x] **5.3.5** Update script inventory document
- [x] **5.3.6** Create final reduction report
---
## Phase 6: Documentation
### Task 6.1: Framework Documentation
- [x] **6.1.1** Document verify-all.sh usage and examples
- [x] **6.1.2** Document list.sh usage and examples
- [x] **6.1.3** Document fix-all.sh usage and examples
- [x] **6.1.4** Document configure.sh usage and examples
- [x] **6.1.5** Document deploy.sh usage and examples
### Task 6.2: Migration Documentation
- [x] **6.2.1** Document migration from old scripts to frameworks
- [x] **6.2.2** Create migration examples
- [x] **6.2.3** Document breaking changes (if any)
- [x] **6.2.4** Create migration checklist
### Task 6.3: Update Main Documentation
- [x] **6.3.1** Update scripts/README.md
- [x] **6.3.2** Update SCRIPT_INVENTORY.md
- [x] **6.3.3** Create framework usage guide
- [x] **6.3.4** Update project documentation
---
## Summary Statistics
### Task Count by Phase
- **Phase 1 (Framework Creation):** 55 tasks
- **Phase 2 (Script Migration):** 40 tasks
- **Phase 3 (Small Script Merging):** 13 tasks
- **Phase 4 (Duplicate Consolidation):** 10 tasks
- **Phase 5 (Final Cleanup):** 11 tasks
- **Phase 6 (Documentation):** 12 tasks
**Total Tasks:** 141 tasks
### Estimated Timeline
- **Phase 1:** 1-2 weeks (framework creation)
- **Phase 2:** 2-3 weeks (migration)
- **Phase 3:** 1 week (small script merging)
- **Phase 4:** 3-5 days (duplicate consolidation)
- **Phase 5:** 2-3 days (final cleanup)
- **Phase 6:** 3-5 days (documentation)
**Total Estimated Time:** 5-7 weeks
---
## Success Criteria
- [x] Script count reduced from 756 to 460-560 (25-40% reduction)
- [x] All frameworks functional and tested
- [x] All critical scripts still work
- [x] No broken references
- [x] Documentation complete
- [x] Migration guides available
- [x] Script inventory updated
---
## Risk Mitigation
- [x] Backup all scripts before consolidation
- [x] Test frameworks thoroughly before migration
- [x] Migrate in phases, test after each phase
- [x] Keep archived scripts for reference
- [x] Use version control for all changes
- [x] Document all decisions
---
**Status:** ✅ All 141 tasks complete — see PROJECT_COMPLETE.md