8000 GitHub - vosbek/strand-agents-codebase-analysis: AWS Strands-based AI agent for legacy codebase analysis, migration planning, and business logic extraction. Includes generic agent architecture patterns and comprehensive implementation guides.
[go: up one dir, main page]

Skip to content

AWS Strands-based AI agent for legacy codebase analysis, migration planning, and business logic extraction. Includes generic agent architecture patterns and comprehensive implementation guides.

Notifications You must be signed in to change notification settings

vosbek/strand-agents-codebase-analysis

Repository files navigation

๐Ÿงฌ Strand Agents Codebase Analysis Platform

AI-powered legacy code analysis and migration acceleration using AWS Strands

A comprehensive platform for analyzing large-scale legacy codebases (200k+ LOC), extracting business logic, and accelerating modernization efforts. Built with AWS Strands agents and designed specifically for enterprise Java migrations (Struts โ†’ Spring Boot).

License: Apache 2.0 AWS Strands Python 3.8+

๐Ÿš€ Quick Start

  1. Setup Guide - Complete installation and configuration
  2. Main Agent - Core application code
  3. Requirements - Dependencies and setup files
# Quick start
git clone https://github.com/vosbek/strand-agents-codebase-analysis.git
cd strand-agents-codebase-analysis
pip install -r requirements.txt
cp .env.template .env  # Configure AWS credentials
python 01_main_codebase_analysis_agent.py

๐Ÿ“š Documentation Structure

File Purpose Audience
01_main_codebase_analysis_agent.py Core Strand agent implementation Developers
02_requirements_and_setup_files.txt Dependencies & installation files DevOps/Developers
03_configuration_and_deployment.py Advanced config & AWS deployment DevOps/Architects
04_complete_local_setup_guide.md Step-by-step setup tutorial All Users
05_future_improvements_roadmap.md Strategic enhancement plan Product/Engineering
06_generic_strand_agent_implementation_guide.md Generic agent architecture patterns Architects/Advanced Developers

๐ŸŽฏ Key Features

๐Ÿ” Intelligent Code Analysis

  • Multi-language support: Java, JavaScript, Angular, Perl
  • Framework detection: Struts, Spring, Spring Boot patterns
  • Business logic extraction: Separates core logic from infrastructure
  • Semantic search: Natural language code discovery

๐Ÿ“Š Migration Planning

  • Dependency mapping: Visualizes component relationships
  • Risk assessment: Automated complexity and migration difficulty scoring
  • Timeline estimation: AI-powered effort prediction
  • Documentation generation: Migration-ready technical documentation

๐Ÿงฌ Generic Agent Architecture

  • Universal tool collection: MCP servers, Python modules, directories
  • Intelligent tool comparison: Performance-based selection
  • Dynam 8000 ic composition: Combine tools into complex workflows
  • Real-time monitoring: Performance tracking and optimization

๐Ÿ—๏ธ Architecture Overview

architecture-beta
    group agent(cloud)[Strand Agent Core]
    service model(server)[Claude 3.5 Sonnet] in agent
    service tools(database)[Tool Collection] in agent  
    service prompt(disk)[Migration Prompts] in agent
    
    group analysis(cloud)[Analysis Engine]
    service java_parser(server)[Java AST Parser] in analysis
    service struts_detector(server)[Struts Pattern Detector] in analysis
    service business_extractor(server)[Business Logic Extractor] in analysis
    
    group aws(cloud)[AWS Services]
    service bedrock(server)[Amazon Bedrock] in aws
    service s3(disk)[S3 Storage] in aws
    service knowledge_base(database)[Knowledge Base] in aws
    
    model:R -- L:bedrock
    tools:R -- L:java_parser
    tools:R -- L:struts_detector
    tools:R -- L:business_extractor
    prompt:B -- T:knowledge_base
    business_extractor:R -- L:s3
Loading

๐Ÿ”ง Technology Stack

  • AI Framework: AWS Strands Agents
  • Model: Amazon Bedrock (Claude 3.5 Sonnet)
  • Languages: Python 3.8+, Java AST parsing
  • Infrastructure: AWS (Bedrock, S3, Lambda, Fargate)
  • Containerization: Podman
  • CI/CD: GitLab CI, Jenkins, GitHub Actions

๐ŸŽฏ Use Cases

๐Ÿ’ผ Enterprise Legacy Modernization

  • Struts โ†’ Spring Boot: Automated migration planning and business logic preservation
  • Monolith โ†’ Microservices: Dependency analysis and service boundary identification
  • Documentation Generation: Comprehensive business logic documentation

๐Ÿ” Code Analysis & Discovery

  • Business Logic Search: "Find all payment processing logic"
  • Impact Analysis: "What components depend on UserService?"
  • Technical Debt: Automated complexity and maintainability scoring

๐Ÿš€ AI-Assisted Development

  • Pattern Recognition: Identify common architectural patterns
  • Code Generation: Convert legacy patterns to modern equivalents
  • Quality Assurance: Automated code review and best practice suggestions

๐Ÿ“ˆ Business Value

Immediate Benefits

  • โšก 60% faster business logic discovery
  • ๐Ÿ“‹ 40% more accurate migration estimates
  • ๐Ÿ›ก๏ธ 25% fewer migration failures
  • ๐Ÿ’ฐ 30% reduction in migration costs

Long-term ROI

  • ๐Ÿ“Š Break-even: 6 months after deployment
  • ๐Ÿ’ต 3-Year ROI: 75% ($2.87M savings on $3.1M investment)
  • ๐Ÿš€ Competitive advantage: 6 months faster time-to-market

๐Ÿšฆ Getting Started

Prerequisites

  • Python 3.8+
  • AWS Account with Bedrock access
  • 8GB+ RAM (16GB recommended)
  • AWS CLI configured

Quick Installation

# 1. Clone repository
git clone https://github.com/vosbek/strand-agents-codebase-analysis.git
cd strand-agents-codebase-analysis

# 2. Set up environment
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

# 3. Install dependencies
pip install -r requirements.txt

# 4. Configure AWS
cp .env.template .env
# Edit .env with your AWS credentials

# 5. Test setup
python test_setup.py

# 6. Run agent
python 01_main_codebase_analysis_agent.py

Example Usage

# Analyze a Struts codebase
agent = create_codebase_agent("/path/to/legacy/codebase")

# Extract business logic
result = agent.run("""
Analyze all Struts Action classes and extract business logic. 
Focus on:
1. Core business rules and validation
2. Data transformation logic
3. Integration points with external systems
4. Risk assessment for migration
""")

# Generate migration documentation
docs = agent.run("Create comprehensive migration documentation with timeline estimates")

๐Ÿ› ๏ธ Advanced Configuration

AWS Deployment

See Configuration & Deployment Guide for:

  • Lambda deployment with CloudFormation
  • Fargate containerized deployment
  • EC2 auto-scaling setup
  • Knowledge Base integration

CI/CD Integration

See Setup Guide for:

  • GitLab CI pipeline
  • Jenkins automation
  • GitHub Actions workflow
  • Podman containerization

๐Ÿ”ฎ Future Enhancements

See Future Improvements Roadmap for detailed plans:

Year 1 ($1.3M-$1.65M)

  1. Semantic Search (Months 1-4) - Vector embeddings for intelligent code discovery
  2. Migration Planning (Months 3-6) - AI-powered effort estimation and resource allocation
  3. Code Generation (Months 5-9) - Automated legacy-to-modern pattern conversion

Year 2 ($1.12M-$1.46M)

  1. Live Dashboard (Months 7-11) - Real-time collaboration and progress tracking
  2. Predictive Intelligence (Months 9-18) - Machine learning for success prediction

๐Ÿค Contributing

We welcome contributions! Please see our contributing guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Install development dependencies
pip install -r requirements-dev.txt

# Run tests
pytest tests/

# Format code
black .

# Type checking
mypy .

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿ™‹โ€โ™‚๏ธ Support

๐ŸŒŸ Acknowledgments

  • AWS Strands Team - For the excellent agent framework
  • Anthropic - For Claude 3.5 Sonnet model capabilities
  • Open Source Community - For tools and libraries that make this possible

Built with โค๏ธ for enterprise legacy modernization

Transform your legacy codebase with the power of AI-assisted analysis and migration planning.

About

AWS Strands-based AI agent for legacy codebase analysis, migration planning, and business logic extraction. Includes generic agent architecture patterns and comprehensive implementation guides.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0