CODITECT v4
AI-powered platform that transforms Architecture Decision Records into working software.
π New ORCHESTRATOR? Start here: CLAUDE.md Β§ ORCHESTRATOR First Steps
π Directory Organization: See DIRECTORY-ORGANIZATION-GUIDE.md for file placement rules
What is CODITECT?β
CODITECT enables autonomous software development through AI agents. You write ADRs (Architecture Decision Records) describing what you want, and AI agents build it automatically with production-ready code, tests, and deployment.
π Current Production URLsβ
- Frontend: https://coditect-frontend-1059494892139.us-central1.run.app
- API: https://coditect-api-v2-1059494892139.us-central1.run.app
- WebSocket Proxy: https://websocket-proxy-1059494892139.us-central1.run.app
- Static IP (for coditect.ai): 34.8.51.57
Core Componentsβ
Primary Componentsβ
- Frontend - React UI for project management and AI interaction
- API Server - Rust backend handling authentication and data
- FoundationDB - Distributed database for multi-tenant storage
- AI Agents - 21 specialized agents for autonomous development
- CODI2 - Primary user interaction system and monitoring platform
- Building CODI2: See CLAUDE.md Β§ Building CODI2
- Latest Binary:
/home/halcasteel/v4/codi2/binaries/codi2-latest
- WebSocket Gateway - Live terminal and agent communication
New Infrastructure Components (v4.1)β
-
CODITECT Server Hub - Centralized server infrastructure providing:
- Unified logging and monitoring across all services
- Real-time log streaming with WebSocket connections
- Dual storage (local + cloud) for resilience
- Admin dashboard for system-wide visibility
- RBAC-based access control for logs
- See ADR-029
-
Document Server & KBaaS - Knowledge Base as a Service providing:
- Centralized compliance and standards documentation
- AI agent access to regulatory knowledge
- Industry-specific compliance packs (ISO, GDPR, etc.)
- Real-time document updates and version control
- Global CDN distribution for sub-second access
- See ADR-030
Enhanced Architecture (v4.1)β
System Architecture with New Componentsβ
Data Flow Architectureβ
CODI2 - The Heart of CODITECTβ
CODI2 (CODItect Intelligence v2) is the central nervous system that connects developers and AI agents to the platform. It replaces all traditional bash scripts with a unified command-line interface, providing guaranteed consistency and race-free operations.
Why CODI2? Traditional bash scripts and file-based logging fail in multi-agent environments due to:
- Race conditions when multiple agents write to the same log
- Data loss from file system crashes
- No coordination between concurrent sessions
- Difficult to query and analyze logs
CODI2 solves all these issues with FoundationDB-backed storage and a comprehensive CLI.
CODI2 Command Categoriesβ
1. Logging & Audit Trail (Replaces echo, tee, and log scripts)
# Basic logging
codi2 log "Build started" --action BUILD
# AI-attributed logging (replaces codi-log-ai.sh)
codi2 log-ai "Completed task" --action SUCCESS
# System logging (replaces codi-log-system.sh)
codi2 log-system "Service started" --action START --system-id api-server
# View recent logs (replaces tail -f)
codi2 tail -n 50
2. Session Management (Replaces set-session-identity.sh)
# Start a new session
codi2 session start --identity "DEVELOPER-001"
# Show current session info
codi2 whoami
# Stop session
codi2 session stop
# View session info
codi2 session info
3. File Monitoring (Replaces inotify-tools, fswatch)
# Monitor directory with all features
codi2 monitor /workspace --recursive --track-moves --report-duplicates
# Monitor with filters
codi2 monitor --exclude "*.tmp" --include "*.rs" --include-hidden
# Background monitoring
codi2 monitor --daemon --output monitor.log
4. Agent Coordination (New capabilities)
# Agent heartbeat (replaces manual tracking)
codi2 heartbeat send --agent-id "RUST-DEV"
codi2 heartbeat start --interval 3600
# Agent management
codi2 agent register --type orchestrator
codi2 agent status
codi2 agent sync
5. Issue Tracking (Built-in, no external tools)
# Create and manage issues
codi2 issue create --title "Fix auth bug" --priority high
codi2 issue list --status open
codi2 issue update 123 --status resolved
6. Build & Deployment (Replaces build scripts)
# Build automation
codi2 build start --project api
codi2 build status
codi2 build deploy --environment production
7. Metrics & Analysis (Replaces log parsing scripts)
# Performance metrics
codi2 metrics collect --component api
codi2 metrics export --format prometheus
# Log analysis
codi2 log-analysis patterns --since "1h ago"
codi2 log-analysis anomalies
8. Export & Configuration
# Export logs
codi2 export --output backup.json --since "2024-01-01"
# Configuration management
codi2 config get
codi2 config set log.retention 90
9. Server Components (Production features)
# WebSocket server for real-time updates
codi2 websocket --bind 0.0.0.0:8765
# MCP server for AI tool integration
codi2 mcp --bind 0.0.0.0:3000 --tools codi2,monitor,query
# Web dashboard
codi2 web --port 8080 --open
10. System Management
# Start all services
codi2 start --daemon
# Check system status
codi2 status --format json
# Stop all services
codi2 stop
Migration from Bash Scriptsβ
| Old Bash Script | CODI2 Command |
|---|---|
.codi/scripts/codi-log.sh | codi2 log |
.codi/scripts/codi-log-ai.sh | codi2 log-ai |
.codi/scripts/set-session-identity.sh | codi2 session start |
.codi/scripts/session-start-hook.sh | codi2 start |
tail -f logs/codi-ps.log | codi2 tail |
grep "ERROR" logs/*.log | codi2 log-analysis patterns |
| Manual file watching | codi2 monitor |
echo "status" >> status.log | codi2 log "status" |
π΄ CRITICAL STATUS UPDATE (2025-09-30)β
PRODUCTION SYSTEM NON-FUNCTIONAL
User authentication broken due to FoundationDB connectivity failure. All
/api/v2/auth/*endpoints return 502 errors.Root Cause: External FDB cluster at
10.0.1.3/4/5unreachable from GKE. Internal Load Balancer at10.128.0.8never deployed.Decision: Deploy FoundationDB StatefulSet directly in GKE cluster (2-3 hours to resolution)
Analysis:
Deployment Plans:
- FDB-GKE-DEPLOYMENT-PLAN-2025-09-30.md (88 min)
- FDB-MODEL-MIGRATION-PLAN-2025-09-30.md (90 min)
Timeline: Estimated completion 2025-09-30 16:00 UTC
Current Component Statusβ
β Working:
- Frontend deployed and accessible (all 20 documentation pages)
- GKE infrastructure (pods, ingress, SSL certificates)
- API health checks responding
- DNS configuration correct
π΄ BROKEN (Blocks MVP Launch):
- User Registration: 502 errors (FDB unreachable)
- User Login: 502 errors (FDB unreachable)
- All Authentication: Non-functional
β Cannot Test (Blocked by Auth):
- WebSocket connections (requires authenticated session)
- Pod orchestration (requires user registration)
- File API operations (requires authentication)
- terminal functionality (requires pod + auth)
π§ In Progress:
- FoundationDB GKE Deployment - Phase 1 complete (StatefulSet deployed with 3 nodes)
- Cluster Sizing: 3 nodes with
doubleredundancy (tolerates 1 failure) - Storage: 150GB total (3 Γ 50GB PersistentVolumes)
- Scaling: Can add nodes dynamically with zero downtime
- Next: HAProxy deployment + API connectivity testing
- Cluster Sizing: 3 nodes with
- CODITECT Server Hub deployment
- Document Server implementation
β οΈ Known Issues (Non-Blocking):
- WASM terminal Loading: Analysis completed, see directory cleanup analysis
- CODI2 Metrics: 0% coverage
βΈοΈ Kubernetes (GKE) Deploymentβ
Production Infrastructureβ
- Cluster: codi-poc-e2-cluster (us-central1-a)
- Namespace: coditect-app
- Load Balancer: 34.46.212.40
- Domain: coditect.ai (34.8.51.57)
Quick Deployment Commandsβ
# Deploy updated frontend
cd /home/halcasteel/v4/src/frontend
gcloud builds submit --config=cloudbuild.yaml --project=serene-voltage-464305-n2
kubectl set image deployment/coditect-frontend frontend=gcr.io/serene-voltage-464305-n2/coditect-frontend:latest -n coditect-app
# Deploy updated API
cd /home/halcasteel/v4/src/api-v2
gcloud builds submit --config=cloudbuild.yaml --project=serene-voltage-464305-n2
kubectl set image deployment/coditect-api-v2 api=gcr.io/serene-voltage-464305-n2/coditect-api-v2:latest -n coditect-app
# Check deployment status
kubectl get pods -n coditect-app
kubectl get svc -n coditect-app
kubectl get ingress -n coditect-app
Common Operationsβ
| Operation | Command |
|---|---|
| View deployments | kubectl get deploy -n coditect-app |
| View pods | kubectl get pods -n coditect-app |
| Pod logs | kubectl logs <pod-name> -n coditect-app |
| Rollback | kubectl rollout undo deployment/<name> -n coditect-app |
| Scale | kubectl scale deployment/<name> --replicas=N -n coditect-app |
| Events | kubectl get events -n coditect-app --sort-by='.lastTimestamp' |
Network & SSL Troubleshootingβ
| Operation | Command |
|---|---|
| Test HTTPS | curl -I https://coditect.ai |
| Check SSL cert | openssl s_client -connect coditect.ai:443 -servername coditect.ai </dev/null 2>/dev/null | openssl x509 -noout -dates |
| DNS lookup | dig coditect.ai +short |
| Test with timing | curl -s -o /dev/null -w "Status: %{http_code}, Time: %{time_total}s\n" https://coditect.ai |
| Check ingress | kubectl get ingress -n coditect-app |
| Check certificates | kubectl describe managedcertificate coditect-ai-ssl -n coditect-app |
Complete Guides:
- CLAUDE.md Β§ Kubernetes (GKE) Management
- CLAUDE.md Β§ Network Analysis & Troubleshooting
- SSL Certificate Verification Report
Quick Startβ
# 1. Set up Google Cloud Project
gcloud config set project serene-voltage-464305-n2
# 2. Start monitoring and development environment
cd /home/halcasteel/v4
source .codi/scripts/infrastructure/session-start-hook.sh
# 3. Initialize session identity (for agents)
export SESSION_ID="DEVELOPER-SESSION-$(date +%Y-%m-%d)-01"
source /home/halcasteel/v4/.codi/scripts/session-management/identity/set-session-identity.sh "$SESSION_ID"
# 4. View agent activity
tail -f .codi/logs/codi-ps.log | jq '.'
# 5. Access web tools
echo "Dashboard: http://localhost:8080"
echo "Logs: http://localhost:8080/log-viewer.html"
Project Structureβ
v4/
βββ src/ # Application source code
β βββ api-v2/ # Rust API server v2 (Actix-web, FoundationDB)
β β βββ src/ # Rust source code
β β β βββ auth/ # JWT authentication & authorization
β β β βββ handlers/ # HTTP request handlers
β β β βββ models/ # Data models & schemas
β β β βββ services/ # Business logic services
β β β βββ websocket/ # WebSocket connections
β β βββ Dockerfile # Container image definition
β βββ frontend/ # React 18 + TypeScript UI
β β βββ src/ # React components & pages
β β β βββ components/ # Reusable UI components
β β β βββ pages/ # Route pages (20+ docs pages)
β β β βββ stores/ # Zustand state management
β β β βββ utils/ # Helper utilities
β β βββ public/ # Static assets
β β βββ package.json # Dependencies & scripts
β βββ websocket-gateway/ # Real-time communication gateway
β βββ terminal-core/ # terminal emulation (xterm.js)
β βββ graph-rag/ # Graph RAG for AI context
βββ agents/ # AI agent system (21 agents)
β βββ coditect/ # 10 primary CODITECT agents
β β βββ orchestrator.md # Multi-agent coordination
β β βββ rust-developer.md
β β βββ frontend-developer.md
β β βββ claude-subagents/ # 11 specialist sub-agents
β βββ quick-start-guides/ # Agent onboarding guides
β βββ tools/ # Agent coordination scripts
βββ codi2/ # CODI2 Rust implementation
β βββ src/ # Unified CLI replacing bash scripts
β βββ config/ # Configuration & templates
β βββ scripts/ # Build & deployment automation
β βββ web/ # Web dashboard (log viewer, metrics)
β βββ binaries/ # Compiled CODI2 binaries
βββ docs/ # Documentation (214 files)
β βββ architecture/ # System design & ADRs
β β βββ adrs/ # 31 Architecture Decision Records
β β βββ CODITECT-SDD-CURRENT.md # Software Design Document
β β βββ CODITECT-TDD-CURRENT.md # Technical Design Document
β βββ guides/ # Setup & configuration guides
β βββ implementation/ # Implementation details
β βββ kbaas/ # Knowledge Base as a Service docs
β βββ operations/ # Production operations
β βββ reference/ # API & data model references
β βββ testing/ # Test plans & results
β βββ workflows/ # Development workflows
βββ k8s/ # Kubernetes manifests
β βββ production/ # Production configs (ingress, HPA, SSL)
β βββ infrastructure/ # Infrastructure components
β βββ status-page/ # Status page deployment
βββ scripts/ # Operational scripts
β βββ deployment/ # Deployment automation
β βββ infrastructure/ # Infrastructure setup
β βββ kbaas/ # KBaaS utilities
β βββ mvp/ # MVP deployment scripts
β βββ testing/ # Test automation
βββ projects/ # Time-stamped project directories
β βββ YYYYMMDD-HHMMSS-TaskName-UUID/ # ISO-dated projects
βββ .codi/ # CODI monitoring & coordination
β βββ scripts/ # Essential operations & hooks
β β βββ infrastructure/ # Session start, monitoring
β β βββ logging/ # Log management scripts
β β βββ file-monitoring/ # File watchers & export handlers
β βββ logs/ # Activity tracking (codi-ps.log)
β βββ session/ # Session management
β β βββ conversations/ # Exported conversation logs (100+)
β βββ tools/ # Web dashboard & utilities
βββ standards/ # Development standards
β βββ foundation/ # Foundation standards (logging, testing, errors)
βββ tests/ # Test suites
β βββ integration/ # Integration tests
β βββ unit/ # Unit tests
βββ config/ # Configuration files
β βββ infrastructure.yaml # Infrastructure configuration
βββ infrastructure/ # Deployment configurations
βββ deployment/ # Deployment manifests
βββ kubernetes/ # Kubernetes configs
Key Directories:
src/api-v2/- Production API server with FoundationDBsrc/frontend/- React UI with 27 documentation pagesagents/- 21 AI agents for autonomous developmentcodi2/- Unified CLI replacing 50+ bash scriptsdocs/architecture/adrs/- 31 Architecture Decision Records.codi/session/conversations/- 100+ conversation exports (GitHub backed up)k8s/production/- Production Kubernetes manifests
Application Modulesβ
API Server (src/api/)β
- Authentication: JWT-based multi-tenant auth system
- Models: User, Project, Agent, terminal, Memory schemas
- Services: Container orchestration, AI routing, storage
- Gateway: WebSocket terminal bridge, real-time events
Frontend (src/frontend/)β
- UI Framework: React 18 with Chakra UI components
- State: Zustand for global state management
- editor: Monaco editor for code editing
- terminal: xterm.js for terminal emulation
Infrastructure (infrastructure/)β
- Kubernetes: GKE StatefulSets for containers
- Docker: Container definitions and builds
- Terraform: Infrastructure as Code
AI Agent Developmentβ
CODITECT uses 21 specialized AI agents for autonomous development:
Agent Typesβ
- 10 CODITECT Agents: Strategic decision-makers (orchestrator, rust-developer, etc.)
- 11 Claude Sub-Agents: Tactical specialists for deep analysis
Recent Agent Activitiesβ
- terminal Fix: Root cause identified as vite.config.ts excluding WASM files
- Server Hub Design: ADR-029 completed for centralized logging infrastructure
- KBaaS Architecture: ADR-030 completed for compliance document management
- FDB Connectivity: Resolved using Internal Load Balancer (10.128.0.8)
Multi-Session Developmentβ
# Start multiple agent sessions in parallel
export SESSION_ID="ORCHESTRATOR-SESSION-$(date +%Y-%m-%d)-01"
export SESSION_ID="RUST-DEVELOPER-SESSION-$(date +%Y-%m-%d)-API"
export SESSION_ID="FRONTEND-DEVELOPER-SESSION-$(date +%Y-%m-%d)-UI"
Learn More: Multi-Session Guide | Agent List
Architecture Documentationβ
System Design Documentsβ
- Software Design Document (SDD) - High-level system architecture, components overview, and module interactions
- Technical Design Document (TDD) - Detailed technical specifications, implementation details, and GKE containerization
Essential Documentationβ
For ORCHESTRATORS (Read First!)β
- Orchestrator Guide - Complete orchestrator role definition and protocols
- CLAUDE.md - Session instantiation and ORCHESTRATOR first steps
- Git Playbook - Git workflows, multi-session sync, and troubleshooting
- Log Management Guide - Log synchronization scripts and workflows
New Infrastructure Documentation (v4.1)β
- ADR-029: CODITECT Server Hub - Centralized logging and monitoring infrastructure
- ADR-030: Document Server & KBaaS - Knowledge Base as a Service for compliance
- WASM terminal Fix Analysis - Directory cleanup analysis
Project Managementβ
- Project Structure - ISO-dated project directories with task checklists
- Create Project Script - Automated project setup
- Sprint Planning - 38 sub-agent implementation sprint
Development Resourcesβ
- Multi-Session Guide - Coordinating multiple AI sessions
- Agent List - All 10 CODITECT specialist agents
- Quick Start Guides - Agent-specific tutorials
Architecture & Standardsβ
- ADRs - Architecture Decision Records (Now 30 ADRs including Server Hub & KBaaS)
- ADR Index - Complete list of all architecture decisions
- Standards - Development standards and patterns
- API v2 Documentation - Backend implementation details
- Frontend Documentation - React UI architecture
CODI2 Integration Analysisβ
- CODI Scripts Comprehensive Analysis - Complete inventory of 259 bash scripts
- 17 critical scripts identified (6.6% of total)
- 10 functional categories documented
- Technical details for each script
- CODI2 Gap Analysis - Feature parity assessment
- Current coverage: 35% (12/45 features)
- 8 gap categories with priorities
- 3-phase implementation roadmap
- Critical gaps in service orchestration and log maintenance
Live Deploymentsβ
- API v2: https://coditect-api-v2-1059494892139.us-central1.run.app
- Frontend: https://coditect-frontend-1059494892139.us-central1.run.app
- Legacy API: https://coditect-api-1059494892139.us-central1.run.app
- CODITECT Server Hub (Coming Soon): https://coditect-server-1059494892139.us-central1.run.app
- Document Server (Coming Soon): https://kbaas-1059494892139.us-central1.run.app
- GCP Project: serene-voltage-464305-n2 (Google-GCP-CLI)
- Project Number: 1059494892139
Scripts and Toolsβ
Deployment Scriptsβ
- Quick Deploy - Fast deployment to Cloud Run
- GCloud Build Deploy - Full Cloud Build deployment
- Frontend Fix Deploy - Frontend-specific deployment fixes
- Setup GCP Configs - Configure GCP environment
- Sync CODITECT - Sync deployment artifacts
- Deploy FDB to K8s - Deploy FoundationDB to Kubernetes
Testing Scriptsβ
- API v2 Test - Comprehensive API v2 test suite
- Frontend-Backend Test - Integration tests
- GKE workspace Test - Kubernetes workspace tests
- Create Test User - Create test users
- Test Deployed API - Test production deployment
- Test File API - File operation tests
- Test Complete API - Full API test suite
- Diagnose Production Crash - Debug frontend issues (NEW)
Latest Updates (v4.1)β
September 2025 Releaseβ
New Featuresβ
-
CODITECT Server Hub (ADR-029)
- Centralized logging infrastructure
- Real-time monitoring dashboard
- Dual storage (local + cloud) for resilience
- WebSocket log streaming
- RBAC-based access control
-
Knowledge Base as a Service (ADR-030)
- Centralized compliance documentation
- AI agents can access regulatory knowledge
- Industry-specific compliance packs
- Automatic standard updates
- Global CDN distribution
-
CODI2 Enhancements
- Replaced bash scripts with unified CLI
- FoundationDB-backed logging
- Race condition elimination
- Enhanced monitoring capabilities
- Status: 16MB binary compiled, 35% feature parity
- Analysis: CODI Scripts Analysis
- Gap Report: CODI2 Gap Analysis
Critical Fixesβ
- terminal WASM Loading: Root cause identified in vite.config.ts
- file-explorer Authentication: Fixed Bearer token headers
- Frontend Crash Protection: Added ErrorBoundary components
- CODI2 Binary Compilation: Fixed build configuration issues
Roadmapβ
Q4 2025β
- Deploy CODITECT Server Hub to production
- Launch Document Server with initial compliance packs
- Complete CODI2 feature parity (currently 35%)
- Phase 1: Service orchestration, log maintenance (Critical)
- Phase 2: Actor-specific loggers, export supervisor (High)
- Phase 3: Web dashboard, advanced monitoring (Medium)
- Fix WASM terminal input handling
- Deploy workspace pod v2 with CODI2 integration
Q1 2026β
- Expand KBaaS with 50+ industry packs
- Implement predictive log analytics
- Launch enterprise compliance automation
- Scale to 1M+ logs/minute capacity
Long-term Visionβ
- Become the standard platform for AI-driven compliant software development
- Support all major regulatory frameworks globally
- Enable fully autonomous development with compliance guardrails
- Achieve 99.99% uptime with global distribution
Production Deployment & WebSocket Documentationβ
WebSocket & GKE Integrationβ
- WebSocket Cloud Run Issue - Why WebSocket doesn't work on Cloud Run
- GKE Deployment Success - How we deployed to GKE with WebSocket support
- Optimal WebSocket Solution - HTTPS proxy architecture explanation
Production Deploymentβ
- Production Deployment for coditect.ai - Complete guide for production with custom domain
- GKE Ingress Future Phase - Detailed guide for GKE Ingress with SSL (100-1,000 users)
- Scaling Analysis - Comparison of scaling options and costs
- SSL Certificate Verification - Complete SSL/TLS certificate analysis (2025-09-30)
Documentation Movedβ
- GCP Setup Guide - Project setup instructions
- GCP Billing Structure - Billing configuration
- GCP Quick Reference - Common GCP commands
- Login Endpoint Fix - Authentication troubleshooting
- Register User Manual - User registration guide
- Deployment Issues - Common deployment problems
Testing Documentationβ
- Frontend-Backend Test Summary - Integration test results
- Frontend UI Testing - UI test procedures
Architecture & Integrationβ
- GKE Integration Plan - Kubernetes integration strategy
- GKE workspace Status - Current workspace configuration
Workflow Documentationβ
- Complete Workflow - End-to-end system workflow
- Implementation Roadmap - Development roadmap
Implementation Guidesβ
- MVP Tasks - MVP task breakdown
- MVP Quick Start - Fast MVP setup
- MVP Real Implementation - Detailed implementation guide
CODI2 Build & Binary Managementβ
Building CODI2 from Sourceβ
# Navigate to CODI2 directory
cd /home/halcasteel/v4/codi2
# Build locally (development)
cargo build
# Build locally (release)
cargo build --release
# Submit to Google Cloud Build
gcloud config set project serene-voltage-464305-n2
gcloud builds submit --config=cloudbuild.yaml
Cloud Build Processβ
-
cloudbuild.yaml: Configures the build steps
- Installs FoundationDB client libraries
- Builds CODI2 in release mode
- Uploads binary to Google Cloud Storage
-
Build Output: Binary stored at
gs://serene-voltage-464305-n2-builds/codi2/codi2-- Note: SHORT_SHA substitution not working, binaries named
codi2-without hash
- Note: SHORT_SHA substitution not working, binaries named
-
Build Monitoring:
# View build status in console
# https://console.cloud.google.com/cloud-build/builds?project=1059494892139
# Or via CLI
gcloud builds list --limit=5 --project=serene-voltage-464305-n2
Downloading Built Binariesβ
Binary Naming Convention: Date-stamped binaries help track when they were built
- Format:
codi2-YYYY-MM-DD-HHMM(e.g.,codi2-2025-10-02-1134) - Always create a
codi2-latestsymlink for convenience
# Create binaries directory
mkdir -p /home/halcasteel/v4/codi2/binaries
# List available binaries (sorted by date)
gsutil ls -l gs://serene-voltage-464305-n2-builds/codi2/ | grep -v "/$" | sort -k2 -r | head -10
# Download latest binary with date stamp
gsutil cp gs://serene-voltage-464305-n2-builds/codi2/codi2- /home/halcasteel/v4/codi2/binaries/codi2-$(date +%Y-%m-%d-%H%M)
# Make executable
chmod +x /home/halcasteel/v4/codi2/binaries/codi2-*
# Create symlink to latest (for easy access)
cd /home/halcasteel/v4/codi2/binaries
ln -sf codi2-$(date +%Y-%m-%d-%H%M) codi2-latest
# Verify version
./codi2-latest --version
# Output: codi2 0.2.0
# Test functionality
./codi2-latest test # β
Successfully connected to FoundationDB
./codi2-latest whoami # Shows session info and AI tool detection
./codi2-latest log-ai "Test" --action TEST # Logs to FoundationDB
Common CODI2 Build Issues & Solutionsβ
Compilation Errorsβ
- Missing imports: Add
use crate::errors::Codi2Error; - Moved values: Add
.clone()or change to borrowing with& - Feature gates: Add
#[cfg(feature = "websocket")]for optional features - Type conversions: Update enum usage to struct pattern (e.g., AuditEvent)
Cloud Build Failuresβ
- Path issues: Use
/workspace/not/workspace/codi2/ - Binary not found: Check
target/release/codi2exists - Upload failures: Verify GCS bucket permissions
Binary Download Issuesβ
- Authentication: Run
gcloud auth loginif needed - Missing binary: Check exact name with
gsutil ls - Wrong path: Binary is at
codi2-notcodi2-<hash>
Quick Referenceβ
| Task | Command |
|---|---|
| Build locally | cargo build --release |
| Submit to Cloud Build | gcloud builds submit --config=cloudbuild.yaml |
| List Cloud Builds | gcloud builds list --limit=5 |
| List binaries in GCS | gsutil ls -l gs://serene-voltage-464305-n2-builds/codi2/ |
| Download latest binary | gsutil cp gs://serene-voltage-464305-n2-builds/codi2/codi2- ./binaries/codi2-latest |
| Check version | ./binaries/codi2-latest --version |
CODI2 Self-Documenting Featuresβ
CODI2 is designed to be self-explanatory and discoverable:
Built-in Help Systemβ
# Global help - shows all commands
./codi2-latest --help
# Command-specific help
./codi2-latest monitor --help # Detailed monitoring options
./codi2-latest log-ai --help # AI logging options
./codi2-latest session --help # Session management
AI Environment Detectionβ
# Automatically detect AI development tools
./codi2-latest detect
# Detects: Claude Code, Cursor, VS Code with AI, Ollama, etc.
# List all supported AI tools (20+)
./codi2-latest list-ai-tools
# Show current session information
./codi2-latest whoami
Progressive Feature Discoveryβ
-
Simple commands work immediately:
./codi2-latest test # Test FDB connection
./codi2-latest log-ai "message" # Log with AI attribution
./codi2-latest monitor . # Monitor current directory -
Advanced features discoverable through help:
- Multiple output formats (json, human, compact, fdb, coditect, codi)
- File monitoring with cross-directory move detection
- Hash algorithms (SHA256, SHA1, MD5, BLAKE3, XXH3)
- Pattern filtering and hidden file detection
- Session management and agent coordination
Replaces Multiple Scriptsβ
CODI2 unifies functionality from many bash scripts:
log-aiβ replacescodi-log-ai.shlog-systemβ replacescodi-log-system.shsession initβ replacessession-start-hook.shsession identityβ replacesset-session-identity.shexport-managerβ replaces export file handling
Testing CODI2 Functionalityβ
# Run comprehensive test suite
cd /home/halcasteel/v4/codi2
./scripts/test/comprehensive-test-suite.sh ./binaries/codi2-latest
# Run format tests
./scripts/test/test-all-formats.sh ./binaries/codi2-latest
# Test monitoring features
./scripts/test/test-enhanced-monitor.sh ./binaries/codi2-latest
Built with Rust, React, FoundationDB, and AI agents for autonomous development.