Skip to content

Transform software development with AI agents that collaborate to deliver high-quality code automatically - from requirements to deployment.

reza899/AutoSDLC

Repository files navigation

AutoSDLC Implementation

AutoSDLC Logo

AutoSDLC

Autonomous Software Development Lifecycle

Autonomous Software Development Lifecycle - AI-powered development agent system

🎯 Project Status

Current Phase: Phase 2 βœ… COMPLETE
Next Phase: Phase 3 (End-to-End Features)
Overall Progress: Multi-agent framework implemented, 121/137 tests passing (88.3%)

πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • Git

Development Setup

⚠️ IMPORTANT: Docker must be running before starting development.

# Clone repository
git clone https://github.com/reza899/AutoSDLC.git
cd AutoSDLC

# Install dependencies
npm install

# Ensure Docker is running
docker --version
# If Docker is not running, start Docker Desktop or Docker daemon

# Start complete development environment
npm run dev
# This automatically handles:
# - Building TypeScript code
# - Starting Docker services (PostgreSQL, Redis)
# - Running database migrations
# - Starting MCP server

# Verify health
curl http://localhost:8080/health

Manual Docker Setup

If npm run dev fails, you can start services manually:

# Build TypeScript
npm run build

# Start Docker services
docker-compose up -d

# Wait for services to be healthy (30-60 seconds)
docker-compose ps

# Run migrations
npm run db:migrate

# Start MCP server
npm run mcp:server

Testing

# Run complete test cycle with automatic setup and cleanup
npm test
# This automatically handles:
# - Starting test environment (Docker services)
# - Running all tests with real implementations
# - Cleaning up test resources and stopping services

# For development with persistent test environment
npm run test:coverage

# Run specific test suites (requires manual test environment)
npm test tests/unit/mcp-server.test.ts    # No Docker required
npm test tests/unit/database.test.ts      # Requires PostgreSQL
npm test tests/integration/docker.test.ts # Requires full Docker stack

Test Requirements by Suite

Test Suite Docker Required Services Needed
mcp-server.test.ts ❌ No None (unit tests only)
database.test.ts βœ… Yes PostgreSQL container
docker.test.ts βœ… Yes Full stack (PostgreSQL, Redis, MCP server)

πŸ“‹ Available Commands

Command Description
npm run dev Start complete development environment (build, services, migrations, server)
npm test Run complete test cycle with automatic setup and cleanup
npm run test:coverage Run tests with coverage report
npm run build Build TypeScript
docker-compose up -d Start infrastructure services (manual)
docker-compose down Stop all services

πŸ—οΈ Architecture

Current Implementation (Phase 1 + 2)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Customer Agent  β”‚    β”‚    PM Agent     β”‚    β”‚  Coder Agent    β”‚
β”‚   Requirements  │◄──►│  Coordination   │◄──►│      TDD        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Reviewer Agent β”‚    β”‚   MCP Server    β”‚    β”‚  Tester Agent   β”‚
β”‚   Quality/QA    │◄──►│ (Communication) │◄──►│   Testing/CI    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   PostgreSQL    β”‚    β”‚     Redis       β”‚
                    β”‚   Port: 5432    β”‚    β”‚   Port: 6379    β”‚
                    β”‚  Agent Status   β”‚    β”‚   Cache/Queue   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Planned Architecture (Phase 3)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ GitHub Issues   β”‚    β”‚  Real Workflows β”‚    β”‚  Web Dashboard  β”‚
β”‚   Integration   │◄──►│  Complete TDD   │◄──►│   Monitoring    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ§ͺ Testing Strategy

Test-Driven Development (TDD)

  • Red-Green-Refactor cycle strictly followed
  • No Mocks - all tests use real implementations
  • 80%+ Coverage required for all features

Test Philosophy

  • All tests use real implementations (no mocks)
  • Database tests run against real PostgreSQL
  • Integration tests verify full Docker stack
  • Minimum 80% coverage requirement enforced

πŸ“ Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agents/                    # Multi-agent framework
β”‚   β”‚   β”œβ”€β”€ base-agent.ts          # Abstract agent foundation
β”‚   β”‚   β”œβ”€β”€ simple-base-agent.ts   # Practical agent implementation
β”‚   β”‚   β”œβ”€β”€ customer-agent.ts      # Requirements validation agent
β”‚   β”‚   β”œβ”€β”€ pm-agent.ts            # Project coordination agent
β”‚   β”‚   β”œβ”€β”€ coder-agent.ts         # TDD implementation agent
β”‚   β”‚   β”œβ”€β”€ code-reviewer-agent.ts # Quality assurance agent
β”‚   β”‚   β”œβ”€β”€ tester-agent.ts        # Testing and CI/CD agent
β”‚   β”‚   β”œβ”€β”€ mcp-client.ts          # MCP outbound communication
β”‚   β”‚   β”œβ”€β”€ mcp-agent-server.ts    # MCP inbound server
β”‚   β”‚   β”œβ”€β”€ message-router.ts      # Agent discovery and routing
β”‚   β”‚   β”œβ”€β”€ tool-registry.ts       # System-wide tool registry
β”‚   β”‚   β”œβ”€β”€ agent-output-writer.ts # Status file generation
β”‚   β”‚   └── status-synchronizer.ts # Real-time status coordination
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ mcp-server.ts          # MCP server implementation
β”‚   β”‚   └── database-manager.ts    # Database operations
β”‚   β”œβ”€β”€ workflow/
β”‚   β”‚   └── workflow-coordinator.ts # Multi-agent orchestration
β”‚   β”œβ”€β”€ demo/
β”‚   β”‚   └── workflow-demo.ts       # Complete system demonstration
β”‚   β”œβ”€β”€ types/
β”‚   β”‚   β”œβ”€β”€ agent-types.ts         # Agent type definitions
β”‚   β”‚   └── config.ts              # Configuration interfaces
β”‚   └── mcp-server.ts              # Application entry point
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ unit/                      # Unit tests (121 tests)
β”‚   β”‚   β”œβ”€β”€ base-agent.test.ts     # Agent framework tests
β”‚   β”‚   β”œβ”€β”€ concrete-agents.test.ts # Specialized agent tests
β”‚   β”‚   β”œβ”€β”€ mcp-communication.test.ts # Communication tests
β”‚   β”‚   β”œβ”€β”€ agent-status-system.test.ts # Status coordination tests
β”‚   β”‚   β”œβ”€β”€ database.test.ts       # Database integration tests
β”‚   β”‚   └── mcp-server.test.ts     # MCP server tests
β”‚   └── integration/               # Integration tests (16 tests)
β”‚       β”œβ”€β”€ docker.test.ts         # Full stack integration
β”‚       β”œβ”€β”€ docker-simple.test.ts  # Basic integration
β”‚       └── tdd-workflow.test.ts   # TDD workflow tests
β”œβ”€β”€ Docs/
β”‚   β”œβ”€β”€ Phase-1-Technical-Report.md # Phase 1 documentation
β”‚   β”œβ”€β”€ Phase-2-Technical-Report.md # Phase 2 documentation
β”‚   └── [30+ documentation files]   # Complete system specs
β”œβ”€β”€ docker-compose.yml             # Production services
β”œβ”€β”€ docker-compose.test.yml        # Test services
β”œβ”€β”€ Dockerfile                     # Production container
└── Dockerfile.test               # Test container

πŸ”§ Configuration

Environment Variables

# Server Configuration
MCP_PORT=8080
MCP_HOST=0.0.0.0

# Database Configuration  
DATABASE_URL=postgresql://user:pass@host:5432/dbname
# OR individual settings:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=autosdlc
DB_USER=postgres
DB_PASSWORD=postgres

# Redis Configuration
REDIS_URL=redis://localhost:6379

Docker Configuration

⚠️ CRITICAL: Docker must be running for the system to work properly.

The system uses Docker Compose for service orchestration:

  • PostgreSQL: Database with persistence and health checks
  • Redis: Cache and message queue
  • MCP Server: Main application with health endpoint

Docker Requirements:

  • Docker Desktop (macOS/Windows) or Docker Engine (Linux)
  • Docker Compose v2+
  • Available ports: 5432 (PostgreSQL), 6379 (Redis), 8080 (MCP Server)

Starting Docker Services:

# Development environment
docker-compose up -d

# Test environment (different ports)
docker-compose -f docker-compose.test.yml up -d

# Check services are healthy
docker-compose ps

πŸ“Š Health Monitoring

Health Endpoints

  • MCP Server: GET /health

    {
      "status": "healthy",
      "timestamp": "2025-06-09T01:05:50.640Z",
      "version": "0.1.0",
      "uptime": 28787
    }
  • Database: Connection pool status

  • Redis: Ping response verification

🚧 Development Workflow

Adding New Features (TDD)

  1. Write failing tests first

    npm test -- --watch
  2. Verify tests are red

    npm run test:verify-red
  3. Implement minimal code to pass

  4. Verify tests are green

    npm test
  5. Refactor while maintaining green

  6. Check coverage meets 80%

    npm run test:coverage

πŸ“– Documentation

🎯 Phase Completion Status

βœ… Phase 1: Foundation Week (COMPLETE)

  • MCP Server with health checks
  • Database with migrations and transactions
  • Docker stack with service orchestration
  • Comprehensive testing (80%+ coverage)

βœ… Phase 2: Agent Framework (COMPLETE)

  • 5 specialized agents (Customer, PM, Coder, Reviewer, Tester)
  • Complete MCP communication system (Client/Server/Router)
  • Real-time Agent_Output.md status coordination
  • 121/137 tests passing (88.3% success rate)
  • Workflow orchestration framework
  • Clean development environment

πŸ”„ Phase 3: End-to-End Features (NEXT)

  • Complete TDD workflow implementation
  • Real GitHub integration with pull requests
  • Advanced multi-agent coordination
  • Production web dashboard
  • Enterprise-grade monitoring and security

🀝 Contributing

Development Environment Setup

  1. Fork the repository
  2. Clone your fork
  3. Install dependencies: npm install
  4. Start development stack: npm run dev
  5. Run tests: npm test

Pull Request Process

  1. Create feature branch from main
  2. Write tests first (TDD)
  3. Implement features
  4. Ensure 80%+ test coverage
  5. Update documentation
  6. Submit pull request

πŸ”’ Security

  • Database connections use parameter binding
  • CORS configured for known origins
  • Environment-based secrets management
  • Container isolation for services

πŸ“ License

This project is part of the AutoSDLC system. See LICENSE file for details.

πŸ™‹β€β™€οΈ Support


Built with: TypeScript, Express.js, PostgreSQL, Redis, Docker
Testing: Jest, Supertest, Real Implementations (No Mocks)
Development: Test-Driven Development (TDD)
Status: Phase 2 Complete βœ… - Multi-Agent Framework Ready

About

Transform software development with AI agents that collaborate to deliver high-quality code automatically - from requirements to deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages