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

12 KiB

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

  • 1.1.1 Design verify-all.sh interface and parameters
  • 1.1.2 Create scripts/verify-all.sh with component/type parameters
  • 1.1.3 Implement service verification functions
  • 1.1.4 Implement network verification functions
  • 1.1.5 Implement configuration verification functions
  • 1.1.6 Implement container/VM verification functions
  • 1.1.7 Add help/usage documentation
  • 1.1.8 Test with existing verification scripts
  • 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

  • 1.2.1 Design list.sh interface and parameters
  • 1.2.2 Create scripts/list.sh with type/filter parameters
  • 1.2.3 Implement VM listing functions
  • 1.2.4 Implement container listing functions
  • 1.2.5 Implement service listing functions
  • 1.2.6 Implement network listing functions
  • 1.2.7 Implement configuration listing functions
  • 1.2.8 Add filtering and sorting options
  • 1.2.9 Add help/usage documentation
  • 1.2.10 Test with existing list/show/get scripts
  • 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

  • 1.3.1 Design fix-all.sh interface and parameters
  • 1.3.2 Create scripts/fix-all.sh with issue-type/component parameters
  • 1.3.3 Implement service fix functions
  • 1.3.4 Implement network fix functions
  • 1.3.5 Implement configuration fix functions
  • 1.3.6 Implement container fix functions
  • 1.3.7 Implement permission fix functions
  • 1.3.8 Add dry-run mode
  • 1.3.9 Add help/usage documentation
  • 1.3.10 Test with existing fix-*.sh scripts
  • 1.3.11 Create migration guide for fix-*.sh scripts

Target: Consolidate 93 fix scripts → 30-50 scripts

Task 1.4: Create Configuration Framework

  • 1.4.1 Design configure.sh interface and parameters
  • 1.4.2 Create scripts/configure.sh with component/action parameters
  • 1.4.3 Implement service configuration functions
  • 1.4.4 Implement network configuration functions
  • 1.4.5 Implement container configuration functions
  • 1.4.6 Implement SSL/certificate configuration functions
  • 1.4.7 Implement nginx configuration functions
  • 1.4.8 Add validation and rollback capabilities
  • 1.4.9 Add help/usage documentation
  • 1.4.10 Test with existing configure-*.sh scripts
  • 1.4.11 Create migration guide for configure-*.sh scripts

Target: Consolidate 41 config scripts → 12-20 scripts

Task 1.5: Create Deployment Framework

  • 1.5.1 Design deploy.sh interface and parameters
  • 1.5.2 Create scripts/deploy.sh with component/options parameters
  • 1.5.3 Implement service deployment functions
  • 1.5.4 Implement container deployment functions
  • 1.5.5 Implement infrastructure deployment functions
  • 1.5.6 Implement phased deployment support
  • 1.5.7 Add validation and rollback capabilities
  • 1.5.8 Add help/usage documentation
  • 1.5.9 Test with existing deploy/setup/install scripts
  • 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

  • 2.1.1 Analyze all 124 check/verify/validate scripts
  • 2.1.2 Categorize by verification type (service, network, config, etc.)
  • 2.1.3 Map each script to verify-all.sh parameters
  • 2.1.4 Create migration script to update references
  • 2.1.5 Test migrated scripts work with framework
  • 2.1.6 Archive original scripts to archive/consolidated/verify/
  • 2.1.7 Update documentation references
  • 2.1.8 Verify no broken references

Target: 124 scripts → 25-50 scripts

Task 2.2: Migrate Listing Scripts

  • 2.2.1 Analyze all 18 list/show/get scripts
  • 2.2.2 Categorize by listing type (VMs, containers, services, etc.)
  • 2.2.3 Map each script to list.sh parameters
  • 2.2.4 Create migration script to update references
  • 2.2.5 Test migrated scripts work with framework
  • 2.2.6 Archive original scripts to archive/consolidated/list/
  • 2.2.7 Update documentation references
  • 2.2.8 Verify no broken references

Target: 18 scripts → 2-5 scripts

Task 2.3: Migrate Fix Scripts

  • 2.3.1 Analyze all 93 fix-*.sh scripts
  • 2.3.2 Categorize by fix type (service, network, config, permissions, etc.)
  • 2.3.3 Map each script to fix-all.sh parameters
  • 2.3.4 Create migration script to update references
  • 2.3.5 Test migrated scripts work with framework
  • 2.3.6 Archive original scripts to archive/consolidated/fix/
  • 2.3.7 Update documentation references
  • 2.3.8 Verify no broken references

Target: 93 scripts → 30-50 scripts

Task 2.4: Migrate Configuration Scripts

  • 2.4.1 Analyze all 41 configure/config scripts
  • 2.4.2 Categorize by configuration type (service, network, SSL, nginx, etc.)
  • 2.4.3 Map each script to configure.sh parameters
  • 2.4.4 Create migration script to update references
  • 2.4.5 Test migrated scripts work with framework
  • 2.4.6 Archive original scripts to archive/consolidated/config/
  • 2.4.7 Update documentation references
  • 2.4.8 Verify no broken references

Target: 41 scripts → 12-20 scripts

Task 2.5: Migrate Deployment Scripts

  • 2.5.1 Analyze all 102 deploy/setup/install scripts
  • 2.5.2 Categorize by deployment type (service, container, infrastructure, etc.)
  • 2.5.3 Map each script to deploy.sh parameters
  • 2.5.4 Create migration script to update references
  • 2.5.5 Test migrated scripts work with framework
  • 2.5.6 Archive original scripts to archive/consolidated/deploy/
  • 2.5.7 Update documentation references
  • 2.5.8 Verify no broken references

Target: 102 scripts → 40-60 scripts


Phase 3: Small Script Merging

Task 3.1: Analyze Small Scripts

  • 3.1.1 Identify all scripts < 50 lines (63 scripts)
  • 3.1.2 Group by functionality (utilities, helpers, one-liners, etc.)
  • 3.1.3 Identify merge candidates
  • 3.1.4 Create merge plan for each group

Task 3.2: Create Utility Scripts

  • 3.2.1 Create scripts/utils/container-utils.sh for container helpers
  • 3.2.2 Create scripts/utils/network-utils.sh for network helpers
  • 3.2.3 Create scripts/utils/service-utils.sh for service helpers
  • 3.2.4 Create scripts/utils/config-utils.sh for config helpers
  • 3.2.5 Create scripts/utils/proxmox-utils.sh for Proxmox helpers

Task 3.3: Merge Small Scripts

  • 3.3.1 Merge container-related small scripts into container-utils.sh
  • 3.3.2 Merge network-related small scripts into network-utils.sh
  • 3.3.3 Merge service-related small scripts into service-utils.sh
  • 3.3.4 Merge config-related small scripts into config-utils.sh
  • 3.3.5 Merge Proxmox-related small scripts into proxmox-utils.sh
  • 3.3.6 Archive original small scripts
  • 3.3.7 Update references to use utility functions

Target: 63 scripts → 30-45 scripts


Phase 4: Duplicate Consolidation

Task 4.1: Identify Duplicates

  • 4.1.1 Run duplicate identification script
  • 4.1.2 Review duplicate analysis report
  • 4.1.3 Compare duplicate scripts side-by-side
  • 4.1.4 Identify best version of each duplicate
  • 4.1.5 Document consolidation decisions

Task 4.2: Consolidate Duplicates

  • 4.2.1 Keep best version of each duplicate group
  • 4.2.2 Archive duplicate versions
  • 4.2.3 Update all references to point to kept version
  • 4.2.4 Verify no broken references
  • 4.2.5 Update documentation

Target: 50-100 scripts → consolidated


Phase 5: Final Cleanup

Task 5.1: Remove Obsolete Scripts

  • 5.1.1 Identify scripts not used in 6+ months
  • 5.1.2 Verify scripts are truly obsolete
  • 5.1.3 Archive obsolete scripts
  • 5.1.4 Update documentation

Task 5.2: Update All References

  • 5.2.1 Search for references to archived scripts
  • 5.2.2 Update documentation references
  • 5.2.3 Update README files
  • 5.2.4 Update any automation that calls scripts

Task 5.3: Final Verification

  • 5.3.1 Count final script total (should be 460-560)
  • 5.3.2 Verify all frameworks work correctly
  • 5.3.3 Test critical scripts still function
  • 5.3.4 Verify no broken references
  • 5.3.5 Update script inventory document
  • 5.3.6 Create final reduction report

Phase 6: Documentation

Task 6.1: Framework Documentation

  • 6.1.1 Document verify-all.sh usage and examples
  • 6.1.2 Document list.sh usage and examples
  • 6.1.3 Document fix-all.sh usage and examples
  • 6.1.4 Document configure.sh usage and examples
  • 6.1.5 Document deploy.sh usage and examples

Task 6.2: Migration Documentation

  • 6.2.1 Document migration from old scripts to frameworks
  • 6.2.2 Create migration examples
  • 6.2.3 Document breaking changes (if any)
  • 6.2.4 Create migration checklist

Task 6.3: Update Main Documentation

  • 6.3.1 Update scripts/README.md
  • 6.3.2 Update SCRIPT_INVENTORY.md
  • 6.3.3 Create framework usage guide
  • 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

  • Script count reduced from 756 to 460-560 (25-40% reduction)
  • All frameworks functional and tested
  • All critical scripts still work
  • No broken references
  • Documentation complete
  • Migration guides available
  • Script inventory updated

Risk Mitigation

  • Backup all scripts before consolidation
  • Test frameworks thoroughly before migration
  • Migrate in phases, test after each phase
  • Keep archived scripts for reference
  • Use version control for all changes
  • Document all decisions

Status: All 141 tasks complete — see PROJECT_COMPLETE.md