Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8d57f46
docs: Auto-update and format models.md
github-actions[bot] May 28, 2025
1200f83
Merge PRs 13-17: Comprehensive AI-Driven CI/CD Development Flow System
codegen-sh[bot] May 28, 2025
e832198
Add comprehensive system analysis and testing suite
codegen-sh[bot] May 28, 2025
9bbb59d
Update src/ai_cicd_system/core/codegen_integrator.js
Zeeeepa May 28, 2025
f4b95e0
Update src/ai_cicd_system/core/task_storage_manager.js
Zeeeepa May 28, 2025
7befcff
Update tests/codegen_integration_test.js
Zeeeepa May 28, 2025
9acbae7
Merge pull request #19 from Zeeeepa/codegen/merge-comprehensive-ai-ci…
Zeeeepa May 28, 2025
b2a473c
feat: Implement real Codegen SDK integration with production-grade fe…
codegen-sh[bot] May 28, 2025
2e904ea
feat: Implement production PostgreSQL database for TaskStorageManager
codegen-sh[bot] May 28, 2025
493726f
feat: Add unified AI CI/CD system scaffolding structure
codegen-sh[bot] May 28, 2025
c928368
feat: Implement comprehensive Component Integration Framework
codegen-sh[bot] May 28, 2025
ab3b6ce
feat: Implement comprehensive Claude Code integration
codegen-sh[bot] May 28, 2025
4319a56
feat: implement AgentAPI middleware for System Orchestrator and Claud…
codegen-sh[bot] May 28, 2025
728c118
🚨 CRITICAL FIX: Remove duplicate TaskStorageManager class definitions
codegen-sh[bot] May 28, 2025
b3a92a7
fix: Update package-lock.json for new dependencies
codegen-sh[bot] May 28, 2025
dc4dfe8
Merge PR #31: Claude Code Integration Implementation
codegen-sh[bot] May 28, 2025
e31df76
fix: restore critical dependencies to prevent system failure
codegen-sh[bot] May 28, 2025
07c8158
Merge PR #29: Component Integration Framework Implementation
codegen-sh[bot] May 28, 2025
f9cb0ae
Merge PR #38: CRITICAL FIX - Remove duplicate TaskStorageManager clas…
codegen-sh[bot] May 28, 2025
e135892
fix: remove non-existent @perplexity-ai/sdk package
codegen-sh[bot] May 28, 2025
9e2843d
Merge PR #28: Production PostgreSQL Database Implementation
codegen-sh[bot] May 28, 2025
64fa8a9
fix: remove non-existent @xai-sdk/sdk package
codegen-sh[bot] May 28, 2025
6c521ca
Merge PR #34: AgentAPI Middleware Implementation
codegen-sh[bot] May 28, 2025
9ee16d0
fix: Remove duplicate TaskStorageManager class definition
codegen-sh[bot] May 28, 2025
dc717a6
resolve: merge conflict in package.json
codegen-sh[bot] May 28, 2025
f54a44e
Merge: Real Codegen SDK Integration Implementation
codegen-sh[bot] May 28, 2025
f8e4acc
feat: Implement Claude Code WSL2 Integration and Deployment Pipeline
codegen-sh[bot] May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 52 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,52 @@
# API Keys (Required for using in any role i.e. main/research/fallback -- see `task-master models`)
ANTHROPIC_API_KEY=YOUR_ANTHROPIC_KEY_HERE
PERPLEXITY_API_KEY=YOUR_PERPLEXITY_KEY_HERE
OPENAI_API_KEY=YOUR_OPENAI_KEY_HERE
GOOGLE_API_KEY=YOUR_GOOGLE_KEY_HERE
MISTRAL_API_KEY=YOUR_MISTRAL_KEY_HERE
OPENROUTER_API_KEY=YOUR_OPENROUTER_KEY_HERE
XAI_API_KEY=YOUR_XAI_KEY_HERE
AZURE_OPENAI_API_KEY=YOUR_AZURE_KEY_HERE
# Database Configuration
# PostgreSQL connection settings for TaskMaster AI CI/CD System

# Database Connection
DB_HOST=localhost
DB_PORT=5432
DB_NAME=codegen-taskmaster-db
DB_USER=software_developer
DB_PASSWORD=password
DB_SSL_MODE=disable

# Connection Pool Settings
DB_POOL_MIN=2
DB_POOL_MAX=10
DB_POOL_IDLE_TIMEOUT=10000
DB_POOL_ACQUIRE_TIMEOUT=30000
DB_POOL_CREATE_TIMEOUT=30000
DB_POOL_DESTROY_TIMEOUT=5000
DB_POOL_REAP_INTERVAL=1000
DB_POOL_CREATE_RETRY_INTERVAL=200

# Query and Performance Settings
DB_QUERY_TIMEOUT=60000
DB_RETRY_MAX_ATTEMPTS=3
DB_RETRY_DELAY_MS=1000
DB_RETRY_BACKOFF_FACTOR=2

# Health Check Settings
DB_HEALTH_CHECK_ENABLED=true
DB_HEALTH_CHECK_INTERVAL=30000
DB_HEALTH_CHECK_TIMEOUT=5000

# Migration Settings
DB_MIGRATIONS_TABLE=schema_migrations
DB_MIGRATIONS_DIR=./src/ai_cicd_system/database/migrations

# Audit and Monitoring
DB_AUDIT_ENABLED=true
DB_AUDIT_RETENTION_DAYS=90
DB_SLOW_QUERY_THRESHOLD=1000
DB_LOG_QUERIES=false
DB_LOG_SLOW_QUERIES=true

# Test Database (for running tests)
DB_TEST_URL=postgresql://test_user:test_password@localhost:5432/codegen_taskmaster_test

# TaskStorageManager Configuration
TASK_STORAGE_ENABLE_MOCK=false
TASK_STORAGE_AUTO_MIGRATE=true
TASK_STORAGE_ENABLE_AUDIT=true
TASK_STORAGE_ENABLE_PERFORMANCE_TRACKING=true

54 changes: 54 additions & 0 deletions UNIFIED_SYSTEM_ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Unified AI CI/CD Development Flow System Architecture

## Overview
This document outlines the architecture for the unified AI CI/CD development flow system that integrates all existing components with new components to provide a complete software development workflow.

## System Components

### 1. System Orchestrator (`src/orchestrator/`)
- Central coordination hub managing all workflows
- Workflow state management
- Component communication
- Task scheduling and prioritization

### 2. Database Management (`src/database/`)
- PostgreSQL as central state store
- Task and workflow persistence
- Performance optimization
- Migration management

### 3. External Integrations (`src/integrations/`)
- **Claude Code**: PR validation and debugging
- **AgentAPI Middleware**: Communication bridge
- **Linear Integration**: Issue management and status updates
- **Codegen SDK**: Real API integration for PR creation

### 4. Deployment Pipeline (`src/deployment/`)
- WSL2 deployment automation
- PR validation environment
- Automated testing and validation

### 5. Natural Language Processing (`src/nlp/`)
- Task-to-PR conversion
- Requirements analysis
- Context understanding

### 6. Monitoring & Performance (`src/monitoring/`)
- Real-time system health tracking
- Performance metrics
- Alerting and notifications

### 7. Security & Compliance (`src/security/`)
- Authentication management
- Security auditing
- Compliance validation

## Workflow Flow
```
Linear Issue β†’ Database Task β†’ NLP Processing β†’ Codegen PR Creation β†’
Claude Code Validation β†’ WSL2 Deployment β†’ Status Updates β†’ Monitoring
```

## Implementation Strategy
Each component will be implemented as a separate sub-issue with comprehensive requirements and validation cycles.

220 changes: 220 additions & 0 deletions docker/wsl2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
# WSL2 Environment Dockerfile for Claude Code Integration
# Ubuntu 22.04 LTS base with development tools and runtime environments

FROM ubuntu:22.04

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_VERSION=20
ENV PYTHON_VERSION=3.11
ENV DOCKER_VERSION=24.0.7

# Set working directory
WORKDIR /workspace

# Update package lists and install basic dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
build-essential \
software-properties-common \
apt-transport-https \
ca-certificates \
gnupg \
lsb-release \
unzip \
vim \
nano \
htop \
tree \
jq \
&& rm -rf /var/lib/apt/lists/*

# Install Node.js LTS
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest \
&& npm install -g yarn pnpm

# Install Python 3.11 and pip
RUN add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev \
python${PYTHON_VERSION}-venv \
python3-pip \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
&& python3 -m pip install --upgrade pip setuptools wheel

# Install Docker CLI
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update \
&& apt-get install -y docker-ce-cli=${DOCKER_VERSION}* \
&& rm -rf /var/lib/apt/lists/*

# Install development tools and linters
RUN npm install -g \
eslint \
@typescript-eslint/parser \
@typescript-eslint/eslint-plugin \
prettier \
typescript \
ts-node \
jest \
mocha \
nyc \
nodemon \
pm2

# Install Python development tools
RUN python3 -m pip install \
pylint \
black \
flake8 \
pytest \
pytest-cov \
mypy \
bandit \
safety \
semgrep

# Install additional language support
RUN apt-get update && apt-get install -y \
openjdk-17-jdk \
maven \
gradle \
golang-go \
rustc \
cargo \
php \
composer \
ruby \
ruby-dev \
&& rm -rf /var/lib/apt/lists/*

# Install Go tools
RUN go install golang.org/x/tools/cmd/goimports@latest \
&& go install golang.org/x/lint/golint@latest \
&& go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

# Install Rust tools
RUN cargo install cargo-audit cargo-outdated

# Install security scanning tools
RUN python3 -m pip install \
semgrep \
safety \
bandit

# Install performance monitoring tools
RUN npm install -g \
clinic \
autocannon \
0x

# Create directories for Claude Code integration
RUN mkdir -p /workspace/deployments \
&& mkdir -p /workspace/validation \
&& mkdir -p /workspace/tests \
&& mkdir -p /workspace/reports \
&& mkdir -p /workspace/backups \
&& mkdir -p /workspace/logs

# Set up Git configuration
RUN git config --global user.name "Claude Code WSL2" \
&& git config --global user.email "claude-code@wsl2.local" \
&& git config --global init.defaultBranch main \
&& git config --global pull.rebase false

# Create non-root user for security
RUN useradd -m -s /bin/bash claude \
&& usermod -aG sudo claude \
&& echo "claude ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Set up environment for claude user
USER claude
WORKDIR /home/claude

# Install user-specific tools
RUN npm config set prefix ~/.npm-global \
&& echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc \
&& echo 'export GOPATH=$HOME/go' >> ~/.bashrc \
&& echo 'export PATH=$GOPATH/bin:$PATH' >> ~/.bashrc

# Create workspace structure for claude user
RUN mkdir -p ~/workspace/deployments \
&& mkdir -p ~/workspace/validation \
&& mkdir -p ~/workspace/tests \
&& mkdir -p ~/workspace/reports \
&& mkdir -p ~/workspace/backups \
&& mkdir -p ~/workspace/logs \
&& mkdir -p ~/.cache/claude-code

# Install Claude Code specific dependencies
RUN python3 -m pip install --user \
requests \
aiohttp \
asyncio \
psutil \
docker

# Set up environment variables for Claude Code
ENV CLAUDE_CODE_WORKSPACE=/home/claude/workspace
ENV CLAUDE_CODE_CACHE=/home/claude/.cache/claude-code
ENV CLAUDE_CODE_LOGS=/home/claude/workspace/logs
ENV NODE_ENV=development
ENV PYTHONPATH=/home/claude/workspace:$PYTHONPATH

# Create startup script
RUN echo '#!/bin/bash' > ~/startup.sh \
&& echo 'echo "Claude Code WSL2 Environment Ready"' >> ~/startup.sh \
&& echo 'echo "Node.js: $(node --version)"' >> ~/startup.sh \
&& echo 'echo "Python: $(python3 --version)"' >> ~/startup.sh \
&& echo 'echo "Docker: $(docker --version)"' >> ~/startup.sh \
&& echo 'echo "Git: $(git --version)"' >> ~/startup.sh \
&& echo 'echo "Workspace: $CLAUDE_CODE_WORKSPACE"' >> ~/startup.sh \
&& echo 'cd $CLAUDE_CODE_WORKSPACE' >> ~/startup.sh \
&& echo 'exec "$@"' >> ~/startup.sh \
&& chmod +x ~/startup.sh

# Health check script
RUN echo '#!/bin/bash' > ~/healthcheck.sh \
&& echo 'set -e' >> ~/healthcheck.sh \
&& echo 'node --version > /dev/null' >> ~/healthcheck.sh \
&& echo 'python3 --version > /dev/null' >> ~/healthcheck.sh \
&& echo 'git --version > /dev/null' >> ~/healthcheck.sh \
&& echo 'docker --version > /dev/null' >> ~/healthcheck.sh \
&& echo 'echo "Health check passed"' >> ~/healthcheck.sh \
&& chmod +x ~/healthcheck.sh

# Set up resource monitoring
RUN echo '#!/bin/bash' > ~/monitor.sh \
&& echo 'while true; do' >> ~/monitor.sh \
&& echo ' echo "$(date): CPU: $(top -bn1 | grep "Cpu(s)" | awk "{print \$2}" | cut -d"%" -f1)%, Memory: $(free | grep Mem | awk "{printf \"%.1f\", \$3/\$2 * 100.0}")%"' >> ~/monitor.sh \
&& echo ' sleep 30' >> ~/monitor.sh \
&& echo 'done' >> ~/monitor.sh \
&& chmod +x ~/monitor.sh

# Expose common development ports
EXPOSE 3000 3001 8000 8080 9000 5000 5432 27017

# Set default command
ENTRYPOINT ["./startup.sh"]
CMD ["bash"]

# Add labels for identification
LABEL maintainer="Claude Code Integration Team"
LABEL version="1.0.0"
LABEL description="WSL2 environment for Claude Code integration with comprehensive development tools"
LABEL org.opencontainers.image.title="Claude Code WSL2 Environment"
LABEL org.opencontainers.image.description="Ubuntu 22.04 based development environment for Claude Code integration"
LABEL org.opencontainers.image.version="1.0.0"
LABEL org.opencontainers.image.vendor="Claude Code"

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD ./healthcheck.sh

Loading
Loading