xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Check project compliance with standards and generate audit documentation
How it fires
How this command gets triggered: by you, by Claude, or both.
/xcomplianceContext preview
What this command does when you run it.
Check project compliance with standards and generate audit documentation
description: Check project compliance with standards and generate audit documentation tags: [compliance, audit, security, regulatory, governance]
Perform compliance checks and management based on the arguments provided in $ARGUMENTS.
First, examine the project structure for compliance-related files: !ls -la | grep -E "(compliance|audit|security|policy)" !find . -name "*.md" -o -name "*.yml" -o -name "*.json" | grep -E "(compliance|policy|security)" | head -10
Based on $ARGUMENTS, perform the appropriate compliance operation:
If checking SOC 2 compliance (--soc2): !grep -r "audit" . --include="*.md" --include="*.yml" | head -5 !find . -name "*.log" | grep -E "(access|security|change)" | head -5
Check SOC 2 requirements:
If checking ISO 27001 (--iso27001): !find . -name "*security*" -o -name "*isms*" | head -10
Validate:
If checking GDPR compliance (--gdpr): !grep -r -i "personal.*data\|privacy\|consent" . --include="*.py" --include="*.js" | head -10
Check for:
If generating audit trail (--audit-trail): !git log --since="30 days ago" --pretty=format:"%h %an %ad %s" --date=short !find . -name "*.log" -newer $(date -d "30 days ago" +%Y-%m-%d) 2>/dev/null | head -10
Collect:
If running gap analysis (--gap-analysis): @package.json !pip list | grep -E "(security|audit|compliance)" 2>/dev/null || npm list | grep -E "(security|audit|compliance)" 2>/dev/null
Identify missing:
If collecting evidence (--evidence): !ls -la logs/ 2>/dev/null || echo "No logs directory found" !find . -name "*.cert" -o -name "*.pem" | head -5 !docker images 2>/dev/null | grep -E "(security|scan)" || echo "No security scanning images"
Gather evidence for:
If running assessment (--assessment): !find . -name "Dockerfile" -exec grep -l "USER" {} \; 2>/dev/null !grep -r "password" . --include="*.py" --include="*.js" | grep -v "test" | head -5 !find . -name "*.yml" -exec grep -l "secrets" {} \; 2>/dev/null
Assess:
Think step by step about compliance requirements and provide:
Generate compliance report with findings and recommendations.
If checking policies (--policies, --policy-check): !find . -name "*policy*" -o -name "*procedure*" | head -10 !grep -r "policy" . --include="*.md" | head -5
Validate:
If testing controls (--test-controls): !netstat -tuln 2>/dev/null | grep ":22\|:443\|:80" || echo "Network scan not available" !ps aux | grep -E "(firewall|antivirus|monitoring)" | head -5
Test:
If generating dashboard (--dashboard, --metrics): !uptime !df -h | head -5 !free -h 2>/dev/null || echo "Memory info not available"
Track:
For continuous monitoring (--alerts): Set up compliance alerts for:
Provide compliance scorecard with recommendations for improvement.
If requesting remediation (--remediation): Based on identified gaps, provide:
If checking readiness (--readiness): !find . -name "*.backup" -o -name "*.bak" | head -5 !crontab -l 2>/dev/null | grep -E "(backup|security|audit)" || echo "No scheduled compliance tasks"
Verify readiness for:
Provide audit preparation checklist and recommendations for successful compliance outcomes.
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!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
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…