π AI-Optimized Multi-Language Development with Intelligent Automation
A sophisticated polyglot development environment supporting Python, TypeScript, Rust, Go, and Nushell with DevBox isolation, intelligent automation, and seamless AI integration featuring 112 MCP tools, Enhanced AI Hooks, Docker MCP integration, AG-UI protocol, and Claude-Flow orchestration.
- Python: uv + FastAPI + async/await + SQLAlchemy
- TypeScript: Strict mode + ES modules + Jest + Result patterns
- Rust: Async Tokio + ownership patterns + serde + thiserror
- Go: Context patterns + small interfaces + explicit errors
- Nushell: Structured data + type hints + cross-environment orchestration
- Model Context Protocol (MCP): 112 tools across 15 categories for comprehensive Claude integration
- Enhanced AI Hooks: 4 production-ready hooks with context engineering auto-triggers and intelligent error resolution
- Claude-Flow Integration: AI agent orchestration with hive-mind coordination and automated task spawning
- AG-UI Protocol: 5 agentic environment templates with CopilotKit integration and generative UI
- Docker MCP Toolkit: 34+ containerized tools with HTTP/SSE transport and secure execution
- Context Engineering Framework: Enhanced PRP generation with dynamic templates and dojo integration
- Advanced Analytics: ML-based performance monitoring, predictive insights, and business intelligence
- Centralized DevPod Management: Single script manages all environments including agentic variants β
- DevPod Integration: 1-10 parallel containerized workspaces per environment + 5 agentic variants
- Auto .claude/ Installation: Zero-configuration AI hooks deployment to all containers
- VS Code Integration: Auto-launch with language-specific extensions and Claude-Flow integration
- Resource Management: AI-powered smart lifecycle with optimization and automated cleanup
- Container Security: Multi-layer isolation with host/container boundary validation
- Cross-Language Validation: Parallel testing across all environments with intelligent quality gates
- Enhanced Security: Multi-layer scanning with dependency tracking, container isolation, and host boundary validation
- AI-Powered Error Resolution: Intelligent error analysis with learning and automated suggestions
- Performance Monitoring: ML-based analytics with predictive insights and anomaly detection
- Zero-Drift Configuration: Single source of truth with automated synchronization and validation
# Install DevBox (environment isolation)
curl -fsSL https://get.jetify.com/devbox | bash
# Install direnv (auto environment activation)
# macOS
brew install direnv
# Linux
sudo apt install direnv # Ubuntu/Debian
sudo dnf install direnv # Fedora
sudo pacman -S direnv # Arch
# Add to shell (choose your shell)
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc # Bash
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc # Zsh
echo 'direnv hook fish | source' >> ~/.config/fish/config.fish # Fish# Clone the repository
git clone https://github.com/ricable/polyglot-devenv.git
cd polyglot-devenv
# Quick setup with Nushell automation
nu scripts/setup-all.nu
# Or manual setup
make install# Test Nushell
nu --version
# Test DevBox
devbox version
# Test the unified environment
nu scripts/validate-all.nu quick
# Test MCP server
cd mcp && npm run build && npm run startpolyglot-devenv/
βββ dev-env/ # π Unified Development Environment
β βββ python/ # π Python (uv + FastAPI + async)
β βββ typescript/ # π TypeScript (strict + ES modules)
β βββ rust/ # π¦ Rust (Tokio + ownership patterns)
β βββ go/ # πΉ Go (context + interfaces)
β βββ nushell/ # π Nushell (automation + orchestration)
β βββ scripts/ # π 25+ automation scripts
β βββ config/ # βοΈ Configuration files
β βββ common.nu # π§ Shared utilities
βββ mcp/ # π€ Model Context Protocol Server (Production β
)
β βββ polyglot-server.ts # π‘ Main MCP server (32 core tools)
β βββ modules/ # π§ Modular tool implementation (7 modules, 80 tools)
β β βββ claude-flow.ts # π€ AI agent orchestration (10 tools)
β β βββ enhanced-hooks.ts # π Intelligent automation (8 tools)
β β βββ docker-mcp.ts # π³ Containerized execution (16 tools)
β β βββ host-container.ts # ποΈ Security boundaries (8 tools)
β β βββ nushell-automation.ts # π Cross-language orchestration (23 tools)
β β βββ config-management.ts # βοΈ Zero-drift configuration (7 tools)
β β βββ advanced-analytics.ts # π ML-powered insights (8 tools)
β βββ polyglot-utils.ts # π οΈ Shared utilities & DevPod integration
β βββ polyglot-types.ts # π TypeScript types and interfaces
β βββ dist/ # π¦ Compiled JavaScript (112 total tools)
βββ scripts/ # π Cross-language validation
β βββ validate-all.nu # β
Parallel validation script
βββ host-tooling/ # π₯οΈ Host machine scripts (host/container separation)
β βββ devpod-management/ # π³ CENTRALIZED DevPod management β
β βββ installation/ # βοΈ Host dependency installation
β βββ monitoring/ # π Infrastructure access
β βββ shell-integration/ # π Host shell integration
βββ devpod-automation/ # π³ Container development (Enhanced β
)
β βββ templates/ # π DevPod environment templates
β β βββ .claude-core/ # π€ AI automation template (auto-installed)
β β βββ python/ # π Standard Python devcontainer
β β βββ typescript/ # π Standard TypeScript devcontainer
β β βββ rust/ # π¦ Standard Rust devcontainer
β β βββ go/ # πΉ Standard Go devcontainer
β β βββ nushell/ # π Standard Nushell devcontainer
β β βββ agentic-python/ # π€ AG-UI Python (FastAPI + agents + CopilotKit)
β β βββ agentic-typescript/ # π€ AG-UI TypeScript (Next.js + CopilotKit + agents)
β β βββ agentic-rust/ # π€ AG-UI Rust (Tokio + async agents + protocol)
β β βββ agentic-go/ # π€ AG-UI Go (HTTP server + agent middleware)
β β βββ agentic-nushell/ # π€ AG-UI Nushell (pipeline-based agents)
β βββ agents/ # π€ Agent configuration storage by environment
β βββ scripts/ # π DevPod provisioning and management scripts
βββ context-engineering/ # π Context Engineering Framework (REORGANIZED β
)
β βββ workspace/ # ποΈ Local development & PRP generation
β β βββ features/ # π Feature definitions (input)
β β βββ templates/ # π PRP templates by environment
β β βββ generators/ # βοΈ PRP generation tools
β β βββ docs/ # π Workspace usage documentation
β βββ devpod/ # π³ Containerized execution environment
β β βββ environments/ # π Environment-specific configs (python/, typescript/, rust/, go/, nushell/)
β β βββ execution/ # π Execution engines & reports
β β βββ monitoring/ # π Performance & security tracking
β β βββ configs/ # βοΈ DevPod-specific configurations
β βββ shared/ # π Resources used by both workspace & devpod
β β βββ examples/ # π Reference examples (including dojo/)
β β βββ utils/ # π οΈ Common utilities (Nushell tools)
β β βββ schemas/ # β
Validation schemas
β β βββ docs/ # π Shared documentation
β βββ archive/ # ποΈ Historical PRPs and reports
βββ .claude/ # π§ Claude Code integration (Enhanced β
)
β βββ commands/ # β‘ Slash commands with context engineering
β βββ hooks/ # πͺ Enhanced AI hooks (4 production-ready)
β β βββ context-engineering-auto-triggers.py # π Auto PRP generation
β β βββ intelligent-error-resolution.py # π AI-powered error analysis
β β βββ smart-environment-orchestration.py # π Auto DevPod management
β β βββ cross-environment-dependency-tracking.py # π Security & compatibility
β βββ settings.json # βοΈ Enhanced hooks configuration
β βββ docker-mcp/ # π³ Docker MCP integration scripts
βββ Makefile # π¨ Automation commands
βββ .mcp.json # π MCP server configuration
βββ README.md # π This file
# Complete automated setup
make setup
# Or step by step
make install-deps # Install all dependencies
make setup-envs # Setup all environments
make validate # Validate installation
make start-mcp # Start MCP server- Setup Individual Environments:
# Python environment
cd dev-env/python
devbox shell
devbox run install
# TypeScript environment
cd ../typescript
devbox shell
devbox run install
# Continue for rust, go, nushell...- Test Cross-Language Validation:
# Quick validation
nu scripts/validate-all.nu quick
# Full parallel validation
nu scripts/validate-all.nu --parallel
# Environment-specific validation
nu scripts/validate-all.nu --environment python- Setup MCP Server:
cd mcp
npm install
npm run build
npm run startThe project includes a comprehensive MCP server for sophisticated AI integration:
| Category | Tools | Count | Description |
|---|---|---|---|
| π€ Claude-Flow | AI orchestration, hive-mind coordination | 10 | AI agent orchestration, terminal management |
| π Enhanced AI Hooks | Context engineering, error resolution | 8 | Intelligent automation, smart environment orchestration |
| π³ Docker MCP | Containerized execution, HTTP/SSE transport | 16 | Secure tool execution, comprehensive security scanning |
| ποΈ Host/Container | Security boundaries, credential isolation | 8 | Infrastructure access control, container isolation |
| π Nushell Automation | Cross-language orchestration, data processing | 23 | Performance monitoring, testing frameworks |
| βοΈ Configuration | Zero-drift management, automated sync | 7 | Template management, backup & recovery |
| π Advanced Analytics | ML-based insights, predictive analytics | 8 | Performance optimization, business intelligence |
| π€ AG-UI Protocol | Agentic environments, generative UI | 9 | Agent lifecycle, CopilotKit integration |
| π Core Foundation | Environment, DevBox, DevPod, Security, PRP | 23 | Essential development tools, validation |
Essential MCP Operations:
# Environment & DevPod Management
mcp tool environment_detect '{}'
mcp tool devpod_provision '{"environment": "dev-env/python", "count": 1}'
# AI Agent Orchestration
mcp tool claude_flow_init '{"environment": "dev-env/python"}'
mcp tool agui_provision '{"environment": "agentic-python"}'
# Enhanced Automation
mcp tool enhanced_hook_env_orchestration '{"action": "switch", "target_environment": "dev-env/typescript"}'
# Security & Performance
mcp tool docker_mcp_gateway_start '{"port": 8080}'
mcp tool performance_analytics '{"action": "analyze", "time_range": "week"}'The MCP server is pre-configured in .mcp.json:
{
"mcpServers": {
"polyglot-devenv": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "mcp"
}
}
}Multi-Tool AI Workflows:
# Complete AI-Powered Development Workflow
mcp tool claude_flow_init '{"environment": "dev-env/python"}'
mcp tool docker_mcp_gateway_start '{"port": 8080, "background": true}'
mcp tool agui_provision '{"environment": "agentic-python", "features": ["agentic_chat"]}'
mcp tool claude_flow_spawn '{"environment": "dev-env/python", "task": "Create FastAPI microservice"}'
# Cross-Environment Polyglot Development
mcp tool enhanced_hook_env_orchestration '{"action": "switch", "target_environment": "dev-env/typescript"}'
mcp tool agui_agent_create '{"name": "FrontendAgent", "type": "generative_ui", "environment": "agentic-typescript"}'
mcp tool claude_flow_hive_mind '{"environment": "dev-env", "command": "coordinate"}'
# Security & Performance Monitoring
mcp tool docker_mcp_security_scan '{"target": "all", "detailed": true}'
mcp tool enhanced_hook_dependency_tracking '{"action": "scan", "security_check": true}'
mcp tool performance_analytics '{"action": "optimize", "export_format": "dashboard"}'Use natural language with Claude Code to interact with all 112 tools:
- "Initialize Claude-Flow in Python environment and spawn an AI agent for FastAPI development"
- "Provision 2 agentic TypeScript environments with CopilotKit integration"
- "Run comprehensive security scan across all containers and environments"
- "Generate performance analytics dashboard for the last week"
- "Switch to Rust environment and optimize DevPod resource allocation"
π Complete Tool Reference: See mcp/CLAUDE.md for detailed documentation of all 112 tools, usage examples, and advanced workflows.
# Python development
cd dev-env/python && devbox shell
devbox run test # Run tests
devbox run lint # Run linting
devbox run format # Format code
# TypeScript development
cd dev-env/typescript && devbox shell
devbox run test # Jest tests
devbox run lint # ESLint
devbox run format # Prettier
# Similar patterns for Rust, Go, Nushell# From any environment directory (unified interface)
cd dev-env/python && devbox run devpod:provision # Create Python workspace
cd dev-env/typescript && devbox run devpod:status # Check TypeScript workspaces
cd dev-env/rust && devbox run devpod:help # Get Rust DevPod help
# Direct centralized management
nu host-tooling/devpod-management/manage-devpod.nu provision python
nu host-tooling/devpod-management/manage-devpod.nu status typescript
nu host-tooling/devpod-management/manage-devpod.nu help rust
# Legacy commands (still supported)
make devpod-python # Single workspace via makefile
/devpod-python 2 # Multiple workspaces via slash commands# Validate all environments
make validate
# Clean all environments
make clean
# Performance analysis
make perf-report
# Security scan
make security-scanThe Context Engineering system provides clear separation between development and execution:
- Workspace (
context-engineering/workspace/): Local PRP generation, template development, feature definitions - DevPod (
context-engineering/devpod/): Containerized execution, environment-specific configs, monitoring - Shared (
context-engineering/shared/): Common utilities, examples (dojo/), documentation - Archive (
context-engineering/archive/): Historical tracking, performance analysis
# Generate PRP in workspace
cd context-engineering/workspace
/generate-prp features/user-api.md --env dev-env/python
# Execute in DevPod container
/devpod-python
/execute-prp context-engineering/devpod/environments/python/PRPs/user-api-python.md --validate
# Personal productivity shortcuts (add to CLAUDE.local.md)
alias prp-gen="cd context-engineering/workspace && /generate-prp"
alias prp-exec-py="/devpod-python && /execute-prp"# Enhanced generation with dynamic templates
/generate-prp features/api.md --env python-env --include-dojo --verbose
# Enhanced execution with auto-rollback
python .claude/commands/execute-prp-v2.py context-engineering/devpod/environments/python/PRPs/api-python.md --validate --monitorFiles are automatically formatted on save:
- Python:
ruff format - TypeScript:
prettier - Rust:
rustfmt - Go:
goimports - Nushell:
nu format
Tests run automatically when test files are modified:
- Python:
pytestfortest_*.py,*_test.py - TypeScript:
jestfor*.test.ts,*.spec.js - Rust:
cargo testfor*_test.rs - Go:
go testfor*_test.go - Nushell:
nu testfortest_*.nu
Pre-commit validation ensures code quality:
- Linting across all environments
- Secret scanning
- Cross-environment validation
- Performance regression detection
# Performance dashboard
nu dev-env/nushell/scripts/performance-analytics.nu dashboard
# Resource monitoring
nu dev-env/nushell/scripts/resource-monitor.nu watch
# Generate reports
nu dev-env/nushell/scripts/performance-analytics.nu report --days 7# Get optimization suggestions
nu dev-env/nushell/scripts/performance-analytics.nu optimize
# Resource cleanup
nu dev-env/nushell/scripts/resource-monitor.nu cleanup# Scan all environments
nu dev-env/nushell/scripts/security-scanner.nu scan-all
# Scan specific files
nu dev-env/nushell/scripts/security-scanner.nu scan-file src/main.py
# Vulnerability analysis
nu dev-env/nushell/scripts/security-scanner.nu vulnerabilities- Pre-commit hooks scan for secrets in
.env,.config,.json,.yamlfiles - Integration with git-secrets
- Automatic blocking of commits containing secrets
Nushell Not Found:
# Verify installation
which nu
nu --version
# Add to PATH if needed (macOS/Linux)
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcDevBox Issues:
# Check DevBox installation
devbox version
# Reinstall if needed
curl -fsSL https://get.jetify.com/devbox | bashEnvironment Not Loading:
# Check direnv
direnv status
# Reload environment
direnv reload
# Manual activation
cd dev-env/python && devbox shellMCP Server Issues:
# Rebuild MCP server with all 112 tools
cd mcp && npm run build
# Test server with comprehensive test suite
npm run test
# Test server startup
npm run start
# Check logs
tail -f ~/.claude/notifications.logEnable verbose logging:
# Set debug environment
export MCP_LOG_LEVEL=debug
export NU_LOG_LEVEL=debug
# Run with debug
nu scripts/validate-all.nu --verbose- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow the established patterns:
- Use the unified
dev-env/structure - Add tests for new functionality
- Update documentation
- Follow language-specific style guides
- Use the unified
- Validate your changes:
make validate - Commit and push:
git commit -m 'feat: add amazing feature' - Create a Pull Request
- Python: Use
uvexclusively, type hints mandatory, 88 char line length - TypeScript: Strict mode, never
any, preferunknown, Result patterns - Rust: Embrace ownership, avoid clones, use
Result<T, E>+?operator - Go: Simple explicit code, always check errors, small interfaces
- Nushell:
def "namespace command"pattern, type hints, structured data
This project is licensed under the MIT License - see the LICENSE file for details.
- MCP Server Integration: 112 tools across 15 categories with comprehensive testing β
- Enhanced AI Hooks: 4 production-ready hooks with intelligent automation β
- Claude-Flow Integration: AI agent orchestration with hive-mind coordination β
- AG-UI Protocol: 5 agentic environment templates with CopilotKit integration β
- Docker MCP Toolkit: 34+ containerized tools with HTTP/SSE transport β
- DevPod Multi-Environment: 8 workspaces + 5 agentic variants across all languages β
- Container Auto-Installation: Zero-configuration AI hooks deployment β
- Cross-Language Validation: Parallel execution with intelligent quality gates β
- Advanced Analytics: ML-based performance monitoring and predictive insights β
- Zero-Drift Configuration: Single source of truth with automated synchronization β
# Quick start
git clone https://github.com/ricable/polyglot-devenv.git
cd polyglot-devenv
make setup
# Verify everything works
make validate
# Start developing
cd dev-env/python && devbox shellπ Welcome to the future of polyglot development! This environment combines the power of isolated development environments, intelligent automation, and seamless AI integration with 112 MCP tools, Enhanced AI Hooks, Claude-Flow orchestration, and AG-UI protocol to create the most sophisticated development experience available.
π Getting Started (You are here):
- This README - Project overview, quick start, essential features
- Project structure, workflows, and success metrics
π Core Documentation:
CLAUDE.md- Complete project standards, architecture, workflows, and setup instructionsCLAUDE.local.md- Personal productivity, aliases, IDE config, and troubleshooting
π§ Technical Deep Dive:
mcp/CLAUDE.md- Complete MCP tool reference (112 tools), development guidelines, advanced features- Context Engineering - Workspace/DevPod architecture and PRP workflows
- DevPod Automation - Container development and agentic environments
π Advanced Features:
- Enhanced AI Hooks - 4 production-ready hooks with intelligent automation
- Claude-Flow Integration - AI agent orchestration with hive-mind coordination
- AG-UI Protocol - 5 agentic environment templates with CopilotKit integration
- Docker MCP Toolkit - 34+ containerized tools with HTTP/SSE transport
- Advanced Analytics - ML-based performance monitoring and business intelligence