xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Advanced metrics collection and analysis for development process optimization and SpecDriven AI insights
How it fires
How this command gets triggered: by you, by Claude, or both.
/xmetricsContext preview
What this command does when you run it.
Advanced metrics collection and analysis for development process optimization and SpecDriven AI insights
description: Advanced metrics collection and analysis for development process optimization and SpecDriven AI insights tags: [metrics, analytics, performance, quality, velocity, coverage]
Collect and analyze development metrics based on the arguments provided in $ARGUMENTS.
First, examine the project for metrics and monitoring setup: !find . -name "*.json" -o -name "*.yml" -o -name "*.yaml" | grep -E "(metric|monitor|analytics)" | head -5 !ls -la package.json requirements.txt pyproject.toml 2>/dev/null | head -3 !ps aux | grep -E "(prometheus|grafana|analytics)" | grep -v grep !git log --oneline --since="1 month ago" | wc -l
Based on $ARGUMENTS, perform the appropriate metrics operation:
If viewing dashboard (--dashboard, --overview): !find . -name "*.py" -o -name "*.js" -o -name "*.ts" | wc -l !find . -name "*test*" -type f | wc -l !git log --pretty=format:"%h %an %ad" --date=short --since="1 month ago" | wc -l !git shortlog -sn --since="1 month ago" | head -5
Generate comprehensive metrics dashboard:
If analyzing coverage (--coverage, --dual-coverage): !python -m pytest --cov=. --cov-report=term 2>/dev/null || npm test -- --coverage 2>/dev/null || echo "No coverage tools available" !find . -name "*spec*" -o -name "*requirement*" | wc -l !grep -r "{#.*authority=" . --include="*.md" --include="*.py" | wc -l
Analyze coverage metrics:
If analyzing velocity (--velocity, --productivity, --team): !git log --pretty=format:"%h %s %an %ad" --date=short --since="1 month ago" | head -20 !git log --pretty=format:"%an" --since="1 month ago" | sort | uniq -c | sort -nr !git log --oneline --since="1 week ago" | wc -l !git branch -r | wc -l
Measure team productivity:
If analyzing quality (--quality, --debt, --complexity): !find . -name "*.py" -o -name "*.js" -o -name "*.ts" | xargs wc -l | tail -1 !grep -r "TODO\|FIXME\|HACK" . --include="*.py" --include="*.js" --include="*.ts" | wc -l !python -m pylint **/*.py --output-format=json 2>/dev/null | head -10 || echo "Pylint not available" !find . -name "*test*" -type f | wc -l
Analyze code quality:
If analyzing performance (--performance, --dora, --lead-time): !git log --pretty=format:"%h %ad %s" --date=short --since="1 month ago" | grep -E "(deploy|release|fix)" | wc -l !find . -name "*.yml" -o -name "*.yaml" | xargs grep -l "deploy\|ci\|cd" | head -5 2>/dev/null !uptime !ps aux | head -5
Measure performance metrics:
Think step by step about metrics requirements and provide:
1. **Current State Analysis**:
2. **Metrics Strategy**:
3. **Implementation Plan**:
4. **Insights and Actions**:
Generate comprehensive metrics analysis with dashboard insights, trend analysis, performance indicators, and improvement recommendations.
If no specific operation is provided, perform metrics readiness assessment and recommend metrics implementation strategy based on current development setup and industry best practices.
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…