TDD-based Multi-AI MCP Server - Integrating Codex, Qwen, and Gemini with Test-Driven Development
Aegis AI is a production-grade MCP (Model Context Protocol) server that orchestrates three powerful AI modelsโCodex, Qwen, and Geminiโusing strict Test-Driven Development (TDD) methodology.
The name "Aegis" (mythical shield of protection) reflects our commitment to code quality and reliability through comprehensive testing.
- โ TDD-First Development: All features built with tests before implementation
- ๐ค Multi-AI Integration: Seamless orchestration of Codex, Qwen, and Gemini
- ๐ MCP Protocol Compliant: Full Model Context Protocol support
- ๐ High Test Coverage: Target 70%+ overall, 80%+ for core modules
- ๐ก๏ธ Production Ready: Enterprise-grade reliability and error handling
Claude Code (PM - Project Manager)
โ
โโ Gemini (The Speculator)
โ โโ Role: BDD Spec Generation, Edge Case Discovery
โ
โโ Qwen (The Technician)
โ โโ Role: Test Code Generation, Mocking Implementation
โ
โโ Codex (The Refactorer)
โโ Role: Code Review, Optimization Suggestions
- Node.js: >= 20.0.0
- npm: >= 10.0.0
# Clone the repository
git clone https://github.com/hwandam77/aegis-ai.git
cd aegis-ai
# Install dependencies
npm install
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Watch mode for development
npm run test:watchaegis-ai/
โโโ src/
โ โโโ core/ # Core modules (handlerLoader, stageOrchestrator, etc.)
โ โโโ services/ # AI service integrations (Codex, Qwen, Gemini)
โ โโโ handlers/ # AI-specific request handlers
โ โโโ utils/ # Utility functions
โโโ tests/
โ โโโ core/ # Core module tests
โ โโโ services/ # Service layer tests
โ โโโ handlers/ # Handler tests
โ โโโ mcp/ # MCP protocol tests
โ โโโ integration/ # Integration tests
โโโ docs/
โ โโโ TDD_์
๊ทธ๋ ์ด๋_๊ณํ/ # TDD implementation roadmap
โโโ scripts/ # Build and automation scripts
โโโ .github/
โโโ workflows/ # CI/CD configuration
๐ด RED โ Write failing test
๐ข GREEN โ Write minimal code to pass
๐ต REFACTOR โ Improve code quality
| Module | Target Coverage |
|---|---|
src/core/ |
80%+ |
src/services/ |
70%+ |
src/handlers/ |
60%+ |
| Overall | 70%+ |
- โ All PRs require tests
- โ Bug fixes must include regression tests
- โ New features need spec + implementation
- โ Core modules require Jest specs
- Jest setup and configuration
- Convert existing tests to Jest
- CI/CD pipeline integration
- TDD policy documentation
- handlerLoader.js tests
- stageOrchestrator.js tests
- qualityPipeline.js tests
- stateManager.js tests
- workflowEngine.js tests
- geminiService.js tests
- qwenService.js tests
- codexService.js tests
- Mocking strategies
- Protocol harness implementation
- Mocked stdio tests
- Snapshot tests
- JSON-RPC validation
- generate-test script
- Coverage dashboard
- Git commit hooks
- VS Code extension
- Weekly coverage reports
- Code review automation
- TDD workshops
- Team adoption tracking
For detailed information, see TDD Implementation Plan
# Testing
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Generate coverage report
npm run test:verbose # Verbose output
npm run dashboard # Show TDD dashboard ๐ฎ
# Development
npm start # Start the MCP server
# Quality
npm run lint # Run ESLint (if configured)
npm run format # Format code with Prettier (if configured)- TDD Overview: Complete TDD integration plan
- Phase 1: Infrastructure: Jest setup guide
- Metrics & KPIs: Success measurement
- Checklist: Implementation tracking
We welcome contributions! Please follow our TDD workflow:
- Write tests first (๐ด RED)
- Implement minimal code (๐ข GREEN)
- Refactor and optimize (๐ต REFACTOR)
- Ensure tests pass (
npm test) - Submit PR with tests
| Metric | Value | Target | Status |
|---|---|---|---|
| Test Coverage | 99.33% ๐ | 70% | โ +29.33% |
| Test Count | 105 ๐ | 100+ | โ Exceeded |
| TDD Adoption | 100% ๐ | 100% | โ Perfect |
| Core Coverage | 98.81% ๐ | 80% | โ +18.81% |
| Service Coverage | 100% ๐ | 70% | โ +30% |
Last Updated: 2025-11-22 Status: ๐ 4/6 Phases Complete
- โ Core module stability (80% coverage)
- โ Early bug detection through tests
- โ Safe refactoring capability
- โ Improved code review quality
- โ Overall coverage 70%+
- โ Faster development (reduced debugging time)
- โ Stable handler additions
- โ Quick AI integration changes
- โ TDD culture established
- โ 90% reduction in production bugs
- โ Continuous code quality improvement
- โ Faster onboarding (tests as documentation)
This project is licensed under the MIT License - see the LICENSE file for details.
- Gemini AI: Creative ideation and BDD specification
- Qwen AI: Technical implementation and code generation
- Codex AI: Code review and optimization
- Claude Code: Project management and orchestration
Built with โค๏ธ using Test-Driven Development