Files
scripts/IMPLEMENTATION_CHECKLIST.md
2026-02-09 21:51:52 -08:00

7.7 KiB

Scripts Modularization - Implementation Checklist

Date: 2025-01-27 Total Scripts: 30 Status: Ready to Begin


Phase 1: Script Migration (30 scripts)

Migration Scripts (6 scripts)

  • migrate-readme.shmigration/migrate-readme.sh
  • migrate-terraform.shmigration/migrate-terraform.sh
  • migrate-to-api-gateway.shmigration/migrate-to-api-gateway.sh
  • migrate-to-k8s.shmigration/migrate-to-k8s.sh
  • migrate-to-monitoring.shmigration/migrate-to-monitoring.sh
  • migrate-to-shared-packages.shmigration/migrate-to-shared-packages.sh

Metrics Scripts (10 scripts)

  • collect-code-metrics.shmetrics/collect/collect-code-metrics.sh
  • collect-deployment-metrics.shmetrics/collect/collect-deployment-metrics.sh
  • collect-developer-metrics.shmetrics/collect/collect-developer-metrics.sh
  • collect-infrastructure-metrics.shmetrics/collect/collect-infrastructure-metrics.sh
  • collect-operational-metrics.shmetrics/collect/collect-operational-metrics.sh
  • collect-service-metrics.shmetrics/collect/collect-service-metrics.sh
  • track-all-metrics.shmetrics/track-all-metrics.sh
  • track-success-metrics.shmetrics/track-success-metrics.sh
  • update-metrics.shmetrics/update-metrics.sh
  • generate-metrics-report.shmetrics/generate-metrics-report.sh

DBIS Scripts (4 scripts)

  • automate-dbis-migration.shdbis/automate-dbis-migration.sh
  • migrate-all-dbis-projects.shdbis/migrate-all-dbis-projects.sh
  • migrate-dbis-project.shdbis/migrate-dbis-project.sh
  • test-dbis-migration.shdbis/test-dbis-migration.sh

Infrastructure Scripts (2 scripts)

  • setup-shared-infrastructure.shinfrastructure/setup-shared-infrastructure.sh
  • setup.shinfrastructure/setup.sh

Utility Scripts (8 scripts)

  • analyze-costs.shutils/analyze-costs.sh
  • optimize-builds.shutils/optimize-builds.sh
  • deps-analyze.shutils/deps-analyze.sh
  • deps-audit.shutils/deps-audit.sh
  • build-all.shutils/build-all.sh
  • test-all.shutils/test-all.sh
  • verify-all.shutils/verify-all.sh
  • cleanup.shutils/cleanup.sh

Command to move all at once:

cd /home/intlc/projects/scripts
mv migrate-readme.sh migrate-terraform.sh migrate-to-*.sh migration/
mv collect-*.sh metrics/collect/
mv track-*.sh update-metrics.sh generate-metrics-report.sh metrics/
mv *dbis*.sh dbis/
mv setup*.sh infrastructure/
mv analyze-costs.sh optimize-builds.sh deps-*.sh build-all.sh test-all.sh verify-all.sh cleanup.sh utils/

Phase 2: Update Scripts to Use Libraries (30 scripts)

For each script, add this at the top (after shebang):

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"

Migration Scripts (6)

  • migration/migrate-readme.sh
  • migration/migrate-terraform.sh
  • migration/migrate-to-api-gateway.sh
  • migration/migrate-to-k8s.sh
  • migration/migrate-to-monitoring.sh
  • migration/migrate-to-shared-packages.sh

Metrics Scripts (10)

  • metrics/collect/collect-code-metrics.sh
  • metrics/collect/collect-deployment-metrics.sh
  • metrics/collect/collect-developer-metrics.sh
  • metrics/collect/collect-infrastructure-metrics.sh
  • metrics/collect/collect-operational-metrics.sh
  • metrics/collect/collect-service-metrics.sh
  • metrics/track-all-metrics.sh
  • metrics/track-success-metrics.sh
  • metrics/update-metrics.sh
  • metrics/generate-metrics-report.sh

DBIS Scripts (4)

  • dbis/automate-dbis-migration.sh
  • dbis/migrate-all-dbis-projects.sh
  • dbis/migrate-dbis-project.sh
  • dbis/test-dbis-migration.sh

Infrastructure Scripts (2)

  • infrastructure/setup-shared-infrastructure.sh
  • infrastructure/setup.sh

Utility Scripts (8)

  • utils/analyze-costs.sh
  • utils/optimize-builds.sh
  • utils/deps-analyze.sh
  • utils/deps-audit.sh
  • utils/build-all.sh
  • utils/test-all.sh
  • utils/verify-all.sh
  • utils/cleanup.sh

Replace patterns:

  • echo "..."log_info "..." or log_error "..." or log_success "..." or log_warn "..."
  • command -v toolrequire_command tool or check_command tool
  • mkdir -p dirensure_dir dir
  • Add validate_project_name "$1" where appropriate
  • Add set_error_trap for error handling

Phase 3: Update References

Documentation Files

  • README.md (project root)
  • QUICK_START_GUIDE.md
  • PROJECT_INDEX.md
  • INTEGRATION_TASKS_LIST.md
  • All files in docs/ directory

CI/CD Workflows

  • .github/workflows/ci-pilot-template.yml
  • .github/workflows/publish-shared-packages.yml
  • .github/workflows/infrastructure-deploy.yml
  • .github/workflows/metrics-collection.yml

Search and Update

# Find all references
grep -r "scripts/migrate-to-k8s.sh" . --exclude-dir=node_modules
grep -r "scripts/collect-" . --exclude-dir=node_modules
grep -r "scripts/track-" . --exclude-dir=node_modules
grep -r "scripts/setup.sh" . --exclude-dir=node_modules

Phase 4: Testing

Library Tests

  • Test lib/init.sh loads correctly
  • Test each library function individually
  • Test logging functions output correctly
  • Test validation functions work

Script Tests

  • Test each migration script with --help or no args
  • Test each metrics script
  • Test each DBIS script
  • Test each infrastructure script
  • Test each utility script

Integration Tests

  • Test scripts from project root
  • Test scripts calling other scripts
  • Test error handling
  • Test input validation

Make Executable

find scripts -name "*.sh" -exec chmod +x {} \;

Phase 5: Quality Assurance

Linting

find scripts -name "*.sh" -exec shellcheck {} \;
  • Fix all shellcheck warnings
  • Fix syntax errors
  • Verify shebang lines

Consistency

  • All scripts use libraries
  • All scripts have help text
  • All scripts validate inputs
  • All scripts use logging functions

Phase 6: Final Verification

  • All 30 scripts moved
  • All 30 scripts updated
  • All scripts tested
  • All documentation updated
  • All references updated
  • All scripts executable
  • No linting errors
  • No broken paths

📊 Progress Summary

Phase 1 (Migration): 0/30 (0%) Phase 2 (Updates): 0/30 (0%) Phase 3 (References): 0% Phase 4 (Testing): 0% Phase 5 (QA): 0% Phase 6 (Verification): 0%

Overall Progress: 0%


🚀 Quick Start

1. Move All Scripts

cd /home/intlc/projects/scripts
mv migrate-readme.sh migrate-terraform.sh migrate-to-*.sh migration/
mv collect-*.sh metrics/collect/
mv track-*.sh update-metrics.sh generate-metrics-report.sh metrics/
mv *dbis*.sh dbis/
mv setup*.sh infrastructure/
mv analyze-costs.sh optimize-builds.sh deps-*.sh build-all.sh test-all.sh verify-all.sh cleanup.sh utils/

2. Make All Executable

find scripts -name "*.sh" -exec chmod +x {} \;

3. Update First Script (Example)

# Edit migration/migrate-to-k8s.sh
# Add after shebang:
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"

# Replace echo with log_info, log_error, etc.
# Add validate_project_name "$1"

4. Test

./scripts/migration/migrate-to-k8s.sh test-project

Status: Ready to Begin Next Action: Start Phase 1 - Move Scripts