E

Expert Modernization

Powerful agent for human, loop, modernization, assistant. Includes structured workflows, validation checks, and reusable patterns for expert advisors.

AgentClipticsexpert advisorsv1.0.0MIT
0 views0 copies

Expert Modernization Agent

Your comprehensive agent for guiding complete project modernization β€” upgrading tech stacks, migrating frameworks, modernizing architecture patterns, and transitioning codebases to current standards through a structured, phased workflow.

When to Use This Agent

Choose Expert Modernization Agent when:

  • Modernizing a legacy codebase to current frameworks and patterns
  • Migrating between major framework versions (Angular 8β†’18, .NET Frameworkβ†’.NET 8)
  • Upgrading build systems, package managers, or toolchains
  • Transitioning from monolith to microservices or modular monolith
  • Establishing modern development practices (TypeScript, testing, CI/CD)

Consider alternatives when:

  • You need a small, focused upgrade β€” handle it directly
  • You need new feature development β€” use a developer agent
  • You need architecture design without migration β€” use an architect agent

Quick Start

# .claude/agents/modernization.yml name: Expert Modernization Agent model: claude-sonnet tools: - Read - Write - Edit - Bash - Glob - Grep description: Full-stack modernization agent for tech stack upgrades, framework migrations, and architecture transitions

Example invocation:

claude "Assess our legacy Express.js application and create a modernization plan β€” we want to migrate to Fastify with TypeScript, add Vitest testing, and implement structured logging"

Core Concepts

Modernization Workflow

PhaseActivityDeliverable
1. AssessmentAnalyze current state, dependencies, patternsCurrent state report
2. StrategyDefine target state, migration path, risk areasModernization plan
3. FoundationUpdate build tools, config, type systemInfrastructure ready
4. MigrationConvert code module by moduleWorking migrated code
5. VerificationTest, benchmark, validateQuality confirmation
6. CleanupRemove legacy code, update documentationClean codebase

Migration Strategy Patterns

Big Bang (avoid if possible):
  └─ Rewrite everything at once
  └─ High risk, no incremental value

Strangler Fig (preferred):
  └─ Wrap legacy with new facade
  └─ Migrate one module at a time
  └─ Legacy shrinks as new grows

Branch by Abstraction:
  └─ Create abstraction over legacy
  └─ Build new implementation behind abstraction
  └─ Switch over when ready

Parallel Run:
  └─ Run old and new simultaneously
  └─ Compare outputs for correctness
  └─ Cut over when confident

Configuration

ParameterDescriptionDefault
migration_strategyStrategy (strangler-fig, branch-abstraction, parallel)strangler-fig
risk_toleranceRisk appetite (conservative, balanced, aggressive)conservative
testing_requirementTest coverage requirementexisting + new
backwards_compatMaintain backwards compatibility during migrationtrue
documentationDocument changes during migrationtrue

Best Practices

  1. Assess before you modernize. Map all dependencies, identify tightly-coupled modules, measure test coverage, and catalog technical debt before writing a migration plan. Surprises during migration are expensive β€” discover them during assessment.

  2. Use the strangler fig pattern for incremental migration. Replace one module at a time behind a routing layer or abstraction. Each migration step delivers value independently, and you can pause or reverse at any point. Big-bang rewrites fail more often than they succeed.

  3. Maintain existing test coverage throughout migration. Never delete tests during modernization β€” they're your safety net. Run the existing test suite after each migration step. If tests fail, fix the migration before proceeding.

  4. Upgrade dependencies in a separate step from code migration. Don't change the framework version and rewrite code in the same PR. Upgrade dependencies first, fix breaking changes, verify everything works, then start code modernization. This isolates variables.

  5. Keep the legacy system running until the new system is proven. Don't decommission legacy code until the migrated version has run in production successfully for at least 2 weeks. Maintain the ability to roll back throughout the migration.

Common Issues

Migration stalls at 70% complete because the remaining 30% is the hardest. Teams migrate the easy modules first, leaving the most complex, tightly-coupled code for last. Tackle the riskiest module second (after the easiest one for confidence), not last.

Breaking changes cascade across the codebase during migration. When migrating a shared module, all consumers must update simultaneously. Use the adapter pattern β€” create a compatibility layer that both old and new code can use during the transition period.

Performance regressions after modernization go unnoticed. New frameworks, new serialization, and new abstractions may have different performance characteristics. Benchmark critical paths before and after migration. A "modern" codebase that's 3x slower is not an improvement.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates