verification-%26-quality-assurance by ruvnet/ruview
npx skills add https://github.com/ruvnet/ruview --skill 'Verification & Quality Assurance'此技能提供一个全面的验证与质量保证系统,通过以下方式确保代码质量和正确性:
npx claude-flow@alpha)# 查看当前真实度评分
npx claude-flow@alpha truth
# 运行验证检查
npx claude-flow@alpha verify check
# 使用自定义阈值验证特定文件
npx claude-flow@alpha verify check --file src/app.js --threshold 0.98
# 回滚上次失败的验证
npx claude-flow@alpha verify rollback --last-good
显示代码库和代理任务的全面质量和可靠性指标。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 查看当前真实度评分(默认:表格格式)
npx claude-flow@alpha truth
# 查看特定时间段内的评分
npx claude-flow@alpha truth --period 7d
# 查看特定代理的评分
npx claude-flow@alpha truth --agent coder --period 24h
# 查找低于阈值的文件/任务
npx claude-flow@alpha truth --threshold 0.8
输出格式:
# 表格格式(默认)
npx claude-flow@alpha truth --format table
# JSON 格式,用于编程访问
npx claude-flow@alpha truth --format json
# CSV 格式,用于电子表格分析
npx claude-flow@alpha truth --format csv
# HTML 报告,带可视化图表
npx claude-flow@alpha truth --format html --export report.html
实时监控:
# 监视模式,带实时更新
npx claude-flow@alpha truth --watch
# 自动导出指标
npx claude-flow@alpha truth --export .claude-flow/metrics/truth-$(date +%Y%m%d).json
仪表盘输出示例:
📊 真实度指标仪表盘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
整体真实度评分:0.947 ✅
趋势:↗️ +2.3%(7天)
表现最佳:
verification-agent 0.982 ⭐
code-analyzer 0.971 ⭐
test-generator 0.958 ✅
需要关注:
refactor-agent 0.821 ⚠️
docs-generator 0.794 ⚠️
近期任务:
task-456 0.991 ✅ "实现认证"
task-455 0.967 ✅ "添加测试"
task-454 0.743 ❌ "重构 API"
真实度评分(0.0-1.0):
1.0-0.95:优秀 ⭐(生产就绪)0.94-0.85:良好 ✅(可接受质量)0.84-0.75:警告 ⚠️(需要关注)<0.75:严重 ❌(需要立即处理)趋势指示器:
统计数据:
对代码、任务或代理输出执行全面的验证检查。
文件验证:
# 验证单个文件
npx claude-flow@alpha verify check --file src/app.js
# 递归验证目录
npx claude-flow@alpha verify check --directory src/
# 启用自动修复进行验证
npx claude-flow@alpha verify check --file src/utils.js --auto-fix
# 验证当前工作目录
npx claude-flow@alpha verify check
任务验证:
# 验证特定任务输出
npx claude-flow@alpha verify check --task task-123
# 使用自定义阈值验证
npx claude-flow@alpha verify check --task task-456 --threshold 0.99
# 详细输出,用于调试
npx claude-flow@alpha verify check --task task-789 --verbose
批量验证:
# 并行验证多个文件
npx claude-flow@alpha verify batch --files "*.js" --parallel
# 使用模式匹配验证
npx claude-flow@alpha verify batch --pattern "src/**/*.ts"
# 集成测试套件
npx claude-flow@alpha verify integration --test-suite full
验证系统评估以下方面:
# 获取结构化的 JSON 输出
npx claude-flow@alpha verify check --json > verification.json
# 示例 JSON 结构:
{
"overallScore": 0.947,
"passed": true,
"threshold": 0.95,
"checks": [
{
"name": "code-correctness",
"score": 0.98,
"passed": true
},
{
"name": "security",
"score": 0.91,
"passed": false,
"issues": [...]
}
]
}
自动回滚未通过验证检查的更改。
基本回滚:
# 回滚到最后已知的良好状态
npx claude-flow@alpha verify rollback --last-good
# 回滚到特定提交
npx claude-flow@alpha verify rollback --to-commit abc123
# 交互式回滚,带预览
npx claude-flow@alpha verify rollback --interactive
智能回滚:
# 仅回滚失败的文件(保留良好的更改)
npx claude-flow@alpha verify rollback --selective
# 带自动备份的回滚
npx claude-flow@alpha verify rollback --backup-first
# 试运行模式(预览而不执行)
npx claude-flow@alpha verify rollback --dry-run
回滚性能:
创建包含指标和图表的详细验证报告。
报告格式:
# JSON 报告
npx claude-flow@alpha verify report --format json
# 带图表的 HTML 报告
npx claude-flow@alpha verify report --export metrics.html --format html
# 用于数据分析的 CSV
npx claude-flow@alpha verify report --format csv --export metrics.csv
# Markdown 摘要
npx claude-flow@alpha verify report --format markdown
基于时间的报告:
# 最近 24 小时
npx claude-flow@alpha verify report --period 24h
# 最近 7 天
npx claude-flow@alpha verify report --period 7d
# 最近 30 天,带趋势
npx claude-flow@alpha verify report --period 30d --include-trends
# 自定义日期范围
npx claude-flow@alpha verify report --from 2025-01-01 --to 2025-01-31
报告内容:
运行基于 Web 的交互式验证仪表盘,带实时更新。
# 在默认端口(3000)启动仪表盘
npx claude-flow@alpha verify dashboard
# 自定义端口
npx claude-flow@alpha verify dashboard --port 8080
# 导出仪表盘数据
npx claude-flow@alpha verify dashboard --export
# 带自动刷新的仪表盘
npx claude-flow@alpha verify dashboard --refresh 5s
仪表盘功能:
在 .claude-flow/config.json 中设置验证偏好:
{
"verification": {
"threshold": 0.95,
"autoRollback": true,
"gitIntegration": true,
"hooks": {
"preCommit": true,
"preTask": true,
"postEdit": true
},
"checks": {
"codeCorrectness": true,
"security": true,
"performance": true,
"documentation": true,
"bestPractices": true
}
},
"truth": {
"defaultFormat": "table",
"defaultPeriod": "24h",
"warningThreshold": 0.85,
"criticalThreshold": 0.75,
"autoExport": {
"enabled": true,
"path": ".claude-flow/metrics/truth-daily.json"
}
}
}
调整验证严格度:
# 严格模式(要求 99% 准确度)
npx claude-flow@alpha verify check --threshold 0.99
# 宽松模式(90% 可接受)
npx claude-flow@alpha verify check --threshold 0.90
# 设置默认阈值
npx claude-flow@alpha config set verification.threshold 0.98
按环境设置阈值:
{
"verification": {
"thresholds": {
"production": 0.99,
"staging": 0.95,
"development": 0.90
}
}
}
GitHub Actions:
name: 质量验证
on: [push, pull_request]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 安装依赖
run: npm install
- name: 运行验证
run: |
npx claude-flow@alpha verify check --json > verification.json
- name: 检查真实度评分
run: |
score=$(jq '.overallScore' verification.json)
if (( $(echo "$score < 0.95" | bc -l) )); then
echo "真实度评分过低:$score"
exit 1
fi
- name: 上传报告
uses: actions/upload-artifact@v3
with:
name: verification-report
path: verification.json
GitLab CI:
verify:
stage: test
script:
- npx claude-flow@alpha verify check --threshold 0.95 --json > verification.json
- |
score=$(jq '.overallScore' verification.json)
if [ $(echo "$score < 0.95" | bc) -eq 1 ]; then
echo "验证失败,评分:$score"
exit 1
fi
artifacts:
paths:
- verification.json
reports:
junit: verification.json
在 Swarm 操作期间自动运行验证:
# 启用验证的 Swarm
npx claude-flow@alpha swarm --verify --threshold 0.98
# 带自动回滚的 Hive Mind
npx claude-flow@alpha hive-mind --verify --rollback-on-fail
# 带验证的训练流水线
npx claude-flow@alpha train --verify --threshold 0.99
在协作开发期间启用实时验证:
# 带验证的结对编程
npx claude-flow@alpha pair --verify --real-time
# 带自定义阈值的结对编程
npx claude-flow@alpha pair --verify --threshold 0.97 --auto-fix
在开发期间持续监控代码库:
# 监视目录的更改
npx claude-flow@alpha verify watch --directory src/
# 带自动修复的监视
npx claude-flow@alpha verify watch --directory src/ --auto-fix
# 带通知的监视
npx claude-flow@alpha verify watch --notify --threshold 0.95
将指标发送到外部监控系统:
# 导出到 Prometheus
npx claude-flow@alpha truth --format json | \
curl -X POST https://pushgateway.example.com/metrics/job/claude-flow \
-d @-
# 发送到 DataDog
npx claude-flow@alpha verify report --format json | \
curl -X POST "https://api.datadoghq.com/api/v1/series?api_key=${DD_API_KEY}" \
-H "Content-Type: application/json" \
-d @-
# 自定义 Webhook
npx claude-flow@alpha truth --format json | \
curl -X POST https://metrics.example.com/api/truth \
-H "Content-Type: application/json" \
-d @-
在提交前自动验证:
# 安装预提交钩子
npx claude-flow@alpha verify install-hook --pre-commit
# .git/hooks/pre-commit 示例:
#!/bin/bash
npx claude-flow@alpha verify check --threshold 0.95 --json > /tmp/verify.json
score=$(jq '.overallScore' /tmp/verify.json)
if (( $(echo "$score < 0.95" | bc -l) )); then
echo "❌ 验证失败,评分:$score"
echo "运行 'npx claude-flow@alpha verify check --verbose' 查看详情"
exit 1
fi
echo "✅ 验证通过,评分:$score"
验证速度:
回滚速度:
仪表盘性能:
真实度评分低:
# 获取详细细分
npx claude-flow@alpha truth --verbose --threshold 0.0
# 检查特定标准
npx claude-flow@alpha verify check --verbose
# 查看代理特定问题
npx claude-flow@alpha truth --agent <agent-name> --format json
回滚失败:
# 检查 git 状态
git status
# 查看回滚历史
npx claude-flow@alpha verify rollback --history
# 手动回滚
git reset --hard HEAD~1
验证超时:
# 增加超时时间
npx claude-flow@alpha verify check --timeout 60s
# 分批验证
npx claude-flow@alpha verify batch --batch-size 10
验证命令返回标准退出码:
0:验证通过(评分 ≥ 阈值)1:验证失败(评分 < 阈值)2:验证期间出错(无效输入、系统错误)npx claude-flow@alpha pair - 带验证的协作开发npx claude-flow@alpha train - 带验证反馈的训练npx claude-flow@alpha swarm - 带质量检查的多代理协调npx claude-flow@alpha report - 生成全面的项目报告/docs/truth-scoring.md/docs/verification-criteria.md/examples/verification//docs/api/verification.md每周安装次数
–
仓库
GitHub 星标数
38.5K
首次出现
–
This skill provides a comprehensive verification and quality assurance system that ensures code quality and correctness through:
npx claude-flow@alpha)# 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
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
Example dashboard output:
📊 Truth Metrics Dashboard
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overall Truth Score: 0.947 ✅
Trend: ↗️ +2.3% (7d)
Top Performers:
verification-agent 0.982 ⭐
code-analyzer 0.971 ⭐
test-generator 0.958 ✅
Needs Attention:
refactor-agent 0.821 ⚠️
docs-generator 0.794 ⚠️
Recent Tasks:
task-456 0.991 ✅ "Implement auth"
task-455 0.967 ✅ "Add tests"
task-454 0.743 ❌ "Refactor API"
Truth Scores (0.0-1.0):
1.0-0.95: Excellent ⭐ (production-ready)0.94-0.85: Good ✅ (acceptable quality)0.84-0.75: Warning ⚠️ (needs attention)<0.75: Critical ❌ (requires immediate action)Trend Indicators:
Statistics:
Execute comprehensive verification checks on code, tasks, or agent outputs.
File Verification:
# Verify single file
npx claude-flow@alpha verify check --file src/app.js
# Verify directory recursively
npx claude-flow@alpha verify check --directory src/
# Verify with auto-fix enabled
npx claude-flow@alpha verify check --file src/utils.js --auto-fix
# Verify current working directory
npx claude-flow@alpha verify check
Task Verification:
# Verify specific task output
npx claude-flow@alpha verify check --task task-123
# Verify with custom threshold
npx claude-flow@alpha verify check --task task-456 --threshold 0.99
# Verbose output for debugging
npx claude-flow@alpha verify check --task task-789 --verbose
Batch Verification:
# Verify multiple files in parallel
npx claude-flow@alpha verify batch --files "*.js" --parallel
# Verify with pattern matching
npx claude-flow@alpha verify batch --pattern "src/**/*.ts"
# Integration test suite
npx claude-flow@alpha verify integration --test-suite full
The verification system evaluates:
Code Correctness
Best Practices
Security
Performance
Documentation
# Get structured JSON output
npx claude-flow@alpha verify check --json > verification.json
# Example JSON structure:
{
"overallScore": 0.947,
"passed": true,
"threshold": 0.95,
"checks": [
{
"name": "code-correctness",
"score": 0.98,
"passed": true
},
{
"name": "security",
"score": 0.91,
"passed": false,
"issues": [...]
}
]
}
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:
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:
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:
Set verification preferences in .claude-flow/config.json:
{
"verification": {
"threshold": 0.95,
"autoRollback": true,
"gitIntegration": true,
"hooks": {
"preCommit": true,
"preTask": true,
"postEdit": true
},
"checks": {
"codeCorrectness": true,
"security": true,
"performance": true,
"documentation": true,
"bestPractices": true
}
},
"truth": {
"defaultFormat": "table",
"defaultPeriod": "24h",
"warningThreshold": 0.85,
"criticalThreshold": 0.75,
"autoExport": {
"enabled": true,
"path": ".claude-flow/metrics/truth-daily.json"
}
}
}
Adjust verification strictness:
# Strict mode (99% accuracy required)
npx claude-flow@alpha verify check --threshold 0.99
# Lenient mode (90% acceptable)
npx claude-flow@alpha verify check --threshold 0.90
# Set default threshold
npx claude-flow@alpha config set verification.threshold 0.98
Per-environment thresholds:
{
"verification": {
"thresholds": {
"production": 0.99,
"staging": 0.95,
"development": 0.90
}
}
}
GitHub Actions:
name: Quality Verification
on: [push, pull_request]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: npm install
- name: Run Verification
run: |
npx claude-flow@alpha verify check --json > verification.json
- name: Check Truth Score
run: |
score=$(jq '.overallScore' verification.json)
if (( $(echo "$score < 0.95" | bc -l) )); then
echo "Truth score too low: $score"
exit 1
fi
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: verification-report
path: verification.json
GitLab CI:
verify:
stage: test
script:
- npx claude-flow@alpha verify check --threshold 0.95 --json > verification.json
- |
score=$(jq '.overallScore' verification.json)
if [ $(echo "$score < 0.95" | bc) -eq 1 ]; then
echo "Verification failed with score: $score"
exit 1
fi
artifacts:
paths:
- verification.json
reports:
junit: verification.json
Run verification automatically during swarm operations:
# Swarm with verification enabled
npx claude-flow@alpha swarm --verify --threshold 0.98
# Hive Mind with auto-rollback
npx claude-flow@alpha hive-mind --verify --rollback-on-fail
# Training pipeline with verification
npx claude-flow@alpha train --verify --threshold 0.99
Enable real-time verification during collaborative development:
# Pair with verification
npx claude-flow@alpha pair --verify --real-time
# Pair with custom threshold
npx claude-flow@alpha pair --verify --threshold 0.97 --auto-fix
Monitor codebase continuously during development:
# Watch directory for changes
npx claude-flow@alpha verify watch --directory src/
# Watch with auto-fix
npx claude-flow@alpha verify watch --directory src/ --auto-fix
# Watch with notifications
npx claude-flow@alpha verify watch --notify --threshold 0.95
Send metrics to external monitoring systems:
# Export to Prometheus
npx claude-flow@alpha truth --format json | \
curl -X POST https://pushgateway.example.com/metrics/job/claude-flow \
-d @-
# Send to DataDog
npx claude-flow@alpha verify report --format json | \
curl -X POST "https://api.datadoghq.com/api/v1/series?api_key=${DD_API_KEY}" \
-H "Content-Type: application/json" \
-d @-
# Custom webhook
npx claude-flow@alpha truth --format json | \
curl -X POST https://metrics.example.com/api/truth \
-H "Content-Type: application/json" \
-d @-
Automatically verify before commits:
# Install pre-commit hook
npx claude-flow@alpha verify install-hook --pre-commit
# .git/hooks/pre-commit example:
#!/bin/bash
npx claude-flow@alpha verify check --threshold 0.95 --json > /tmp/verify.json
score=$(jq '.overallScore' /tmp/verify.json)
if (( $(echo "$score < 0.95" | bc -l) )); then
echo "❌ Verification failed with score: $score"
echo "Run 'npx claude-flow@alpha verify check --verbose' for details"
exit 1
fi
echo "✅ Verification passed with score: $score"
Verification Speed:
Rollback Speed:
Dashboard Performance:
Low Truth Scores:
# Get detailed breakdown
npx claude-flow@alpha truth --verbose --threshold 0.0
# Check specific criteria
npx claude-flow@alpha verify check --verbose
# View agent-specific issues
npx claude-flow@alpha truth --agent <agent-name> --format json
Rollback Failures:
# Check git status
git status
# View rollback history
npx claude-flow@alpha verify rollback --history
# Manual rollback
git reset --hard HEAD~1
Verification Timeouts:
# Increase timeout
npx claude-flow@alpha verify check --timeout 60s
# Verify in batches
npx claude-flow@alpha verify batch --batch-size 10
Verification commands return standard exit codes:
0: Verification passed (score ≥ threshold)1: Verification failed (score < threshold)2: Error during verification (invalid input, system error)npx claude-flow@alpha pair - Collaborative development with verificationnpx claude-flow@alpha train - Training with verification feedbacknpx claude-flow@alpha swarm - Multi-agent coordination with quality checksnpx claude-flow@alpha report - Generate comprehensive project reports/docs/truth-scoring.md/docs/verification-criteria.md/examples/verification//docs/api/verification.mdWeekly Installs
–
Repository
GitHub Stars
38.5K
First Seen
–
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
114,200 周安装