Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.
SKILL.md
Verification & Quality Assurance Skill
What This Skill Does
This skill provides a comprehensive verification and quality assurance system that ensures code quality and correctness through:
Truth Scoring: Real-time reliability metrics (0.0-1.0 scale) for code, agents, and tasks
Verification Checks: Automated code correctness, security, and best practices validation
Automatic Rollback: Instant reversion of changes that fail verification (default threshold: 0.95)
Quality Metrics: Statistical analysis with trends, confidence intervals, and improvement tracking
CI/CD Integration: Export capabilities for continuous integration pipelines
Real-time Monitoring: Live dashboards and watch modes for ongoing verification
Prerequisites
Claude Flow installed (npx claude-flow@alpha)
Git repository (for rollback features)
Node.js 18+ (for dashboard features)
Quick Start
# View current truth scores
npx claude-flow@alpha truth
# Run verification check
npx claude-flow@alpha verify check
# Verify specific file with custom threshold
npx claude-flow@alpha verify check --file src/app.js --threshold 0.98
# Rollback last failed verification
npx claude-flow@alpha verify rollback --last-good
Complete Guide
Truth Scoring System
View Truth Metrics
Display comprehensive quality and reliability metrics for your codebase and agent tasks.
Basic Usage:
# View current truth scores (default: table format)
npx claude-flow@alpha truth
# View scores for specific time period
npx claude-flow@alpha truth --period 7d
# View scores for specific agent
npx claude-flow@alpha truth --agent coder --period 24h
# Find files/tasks below threshold
npx claude-flow@alpha truth --threshold 0.8
Output Formats:
# Table format (default)
npx claude-flow@alpha truth --format table
# JSON for programmatic access
npx claude-flow@alpha truth --format json
# CSV for spreadsheet analysis
npx claude-flow@alpha truth --format csv
# HTML report with visualizations
npx claude-flow@alpha truth --format html --export report.html
Real-time Monitoring:
# Watch mode with live updates
npx claude-flow@alpha truth --watch
# Export metrics automatically
npx claude-flow@alpha truth --export .claude-flow/metrics/truth-$(date +%Y%m%d).json
Automatically revert changes that fail verification checks.
Basic Rollback:
# Rollback to last known good state
npx claude-flow@alpha verify rollback --last-good
# Rollback to specific commit
npx claude-flow@alpha verify rollback --to-commit abc123
# Interactive rollback with preview
npx claude-flow@alpha verify rollback --interactive
Smart Rollback:
# Rollback only failed files (preserve good changes)
npx claude-flow@alpha verify rollback --selective
# Rollback with automatic backup
npx claude-flow@alpha verify rollback --backup-first
# Dry-run mode (preview without executing)
npx claude-flow@alpha verify rollback --dry-run
Rollback Performance:
Git-based rollback: <1 second
Selective file rollback: <500ms
Backup creation: Automatic before rollback
Verification Reports
Generate Reports
Create detailed verification reports with metrics and visualizations.
Report Formats:
# JSON report
npx claude-flow@alpha verify report --format json
# HTML report with charts
npx claude-flow@alpha verify report --export metrics.html --format html
# CSV for data analysis
npx claude-flow@alpha verify report --format csv --export metrics.csv
# Markdown summary
npx claude-flow@alpha verify report --format markdown
Time-based Reports:
# Last 24 hours
npx claude-flow@alpha verify report --period 24h
# Last 7 days
npx claude-flow@alpha verify report --period 7d
# Last 30 days with trends
npx claude-flow@alpha verify report --period 30d --include-trends
# Custom date range
npx claude-flow@alpha verify report --from 2025-01-01 --to 2025-01-31
Report Content:
Overall truth scores
Per-agent performance metrics
Task completion quality
Verification pass/fail rates
Rollback frequency
Quality improvement trends
Statistical confidence intervals
Interactive Dashboard
Launch Dashboard
Run interactive web-based verification dashboard with real-time updates.
# Launch dashboard on default port (3000)
npx claude-flow@alpha verify dashboard
# Custom port
npx claude-flow@alpha verify dashboard --port 8080
# Export dashboard data
npx claude-flow@alpha verify dashboard --export
# Dashboard with auto-refresh
npx claude-flow@alpha verify dashboard --refresh 5s
Dashboard Features:
Real-time truth score updates (WebSocket)
Interactive charts and graphs
Agent performance comparison
Task history timeline
Rollback history viewer
Export to PDF/HTML
Filter by time period/agent/score
Configuration
Default Configuration
Set verification preferences in .claude-flow/config.json: