xconfig
Manage project configuration files, environment variables, and application settings
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
How it fires
How this command gets triggered: by you, by Claude, or both.
/xarchitectureContext preview
What this command does when you run it.
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
description: Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns tags: [architecture, design, patterns, ddd, domain-driven-design, bounded-contexts, aggregates, microservices, clean-architecture, 12-factor, cloud-native]
Analyze and design system architecture using Domain-Driven Design, 12-Factor App principles, and proven patterns based on $ARGUMENTS.
**Basic architecture analysis:**
/xarchitecture
**Analyze Domain-Driven Design patterns:**
/xarchitecture --ddd
**Check 12-Factor App compliance:**
/xarchitecture --12factor
**Design microservices architecture:**
/xarchitecture --microservices
If $ARGUMENTS contains "help" or "--help": Display this usage information and exit.
First, examine the current project structure: !find . -type f -name "*.py" -o -name "*.js" -o -name "*.ts" | grep -v node_modules | grep -v __pycache__ | head -20 !ls -la src/ app/ lib/ services/ controllers/ models/ 2>/dev/null || echo "No standard architecture directories found" !find . -name "docker-compose.yml" -o -name "Dockerfile" | head -3 !find . -name "*.md" | xargs grep -l "architecture\|design\|pattern" | head -5 2>/dev/null
Identify existing DDD elements: !find . -name "*Entity*" -o -name "*ValueObject*" -o -name "*Aggregate*" -o -name "*Repository*" | head -10 !grep -r "BoundedContext\|DomainService\|UbiquitousLanguage" . --include="*.py" --include="*.js" --include="*.ts" | head -5 2>/dev/null
Check for domain-driven directory structure: !ls -la domain/ infrastructure/ application/ 2>/dev/null || echo "No DDD layered architecture found"
Check for 12-Factor App compliance: !find . -name ".env*" -o -name "config.*" | head -5 !find . -name "Dockerfile" -o -name "docker-compose.yml" | head -3 !find . -name "Procfile" -o -name "requirements.txt" -o -name "package.json" | head -5 !grep -r "process.env\|os.environ\|System.getenv" . --include="*.py" --include="*.js" --include="*.ts" | wc -l
Based on $ARGUMENTS, perform the appropriate DDD and 12-Factor informed architecture operation:
If analyzing current architecture (--analyze, --layers, --dependencies, --ddd, --12factor): !find . -name "*.py" -o -name "*.js" -o -name "*.ts" | xargs grep -l "import\|require" | head -10 !python -c "import ast; print('Python AST analysis available')" 2>/dev/null || echo "Python not available for analysis" !find . -name "package.json" -o -name "requirements.txt" | head -2
**DDD Strategic Design Analysis:** !grep -r "BoundedContext\|Context\|Domain" . --include="*.py" --include="*.js" --include="*.ts" | wc -l !find . -name "*Context*" -o -name "*Domain*" | head -10
**DDD Tactical Design Analysis:** !find . -name "*Entity*" -o -name "*ValueObject*" -o -name "*Aggregate*" -o -name "*Repository*" -o -name "*DomainService*" | wc -l !grep -r "Entity\|ValueObject\|Aggregate\|Repository" . --include="*.py" --include="*.js" --include="*.ts" | head -10
**12-Factor App Compliance Analysis:** !git remote -v | wc -l || echo "No git remote found (Factor I: Codebase)" !find . -name "requirements.txt" -o -name "package.json" -o -name "Pipfile" | wc -l !find . -name ".env*" | wc -l !grep -r "hardcoded.*password\|hardcoded.*key" . --include="*.py" --include="*.js" --include="*.ts" | wc -l !find . -name "Dockerfile" | wc -l !grep -r "console.log\|print\|logging" . --include="*.py" --include="*.js" --include="*.ts" | wc -l
Analyze 12-Factor App compliance:
Analyze DDD architectural patterns:
If designing architecture (--design, --microservices, --event-driven, --bounded-contexts, --12factor, --cloud-native): !find . -name "*.yml" -o -name "*.yaml" | xargs grep -l "service\|api" 2>/dev/null | head -5 !docker --version 2>/dev/null || echo "Docker not available for containerization" !kubectl version --client 2>/dev/null || echo "Kubernetes not available for orchestration"
**DDD Strategic Design Patterns:**
If designing bounded contexts (--bounded-contexts): Design context boundaries using:
**DDD-Informed Microservices Design:**
-
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex…
Automate git workflow - stage, commit with smart messages, and push to specified branch