Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

πŸ”– Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/verification.js

rUv4b68ac1011ae
diff --git a/.claude/checkpoints/task-1755013067.json b/.claude/checkpoints/task-1755013067.json
new file mode 100644
index 0000000000..b6732be079
--- /dev/null
+++ b/.claude/checkpoints/task-1755013067.json
@@ -0,0 +1 @@
+{"checkpoint": "task-20250812-153745", "task": "whats the difference? @ruvnet ➜ /workspaces/claude-code-flow (alpha-89) $ ./claude-flow truth --r", "timestamp": "2025-08-12T15:37:47Z", "commit": "8d192bd14cd5c5b193127bc0853d13eb66232fb8", "github_release": "true"}
diff --git a/src/cli/simple-commands/verification.js b/src/cli/simple-commands/verification.js
index e2ed520bed..36bfeb551f 100644
--- a/src/cli/simple-commands/verification.js
+++ b/src/cli/simple-commands/verification.js
@@ -227,6 +227,8 @@ export async function verificationCommand(args, flags) {
case 'score':
await system.loadMemory();
const report = await system.generateTruthReport();
+
+ // Basic report (always shown)
console.log('\nπŸ“Š Truth Scoring Report');
console.log('━'.repeat(50));
console.log(`Mode: ${report.mode}`);
@@ -238,6 +240,74 @@ export async function verificationCommand(args, flags) {
for (const [agent, reliability] of Object.entries(report.agentReliability)) {
console.log(` ${agent}: ${(reliability * 100).toFixed(1)}%`);
}
+
+ // Detailed report with --report flag
+ if (flags.report) {
+ console.log('\nπŸ“ˆ Detailed Verification Breakdown:');
+ console.log(` Pass Rate: ${((report.passedVerifications / report.totalVerifications) * 100).toFixed(1)}%`);
+ console.log(` Failure Rate: ${(((report.totalVerifications - report.passedVerifications) / report.totalVerifications) * 100).toFixed(1)}%`);
+
+ // Show recent history
+ if (system.verificationHistory.length > 0) {
+ console.log('\nπŸ“œ Last 10 Verifications:');
+ const recent = system.verificationHistory.slice(-10);
+ for (const v of recent) {
+ const time = new Date(v.timestamp).toLocaleTimeString();
+ console.log(` ${v.passed ? 'βœ…' : '❌'} [${time}] ${v.taskId} (${v.agentType}): ${v.score.toFixed(3)}`);
+ }
+ }
+
+ // Performance metrics
+ console.log('\n🎯 Target Metrics Comparison:');
+ console.log(` Truth Accuracy: ${report.averageScore >= 0.95 ? 'βœ…' : '❌'} ${(report.averageScore * 100).toFixed(1)}% (target: 95%)`);
+ console.log(` Pass Rate: ${report.passedVerifications/report.totalVerifications >= 0.9 ? 'βœ…' : '❌'} ${((report.passedVerifications/report.totalVerifications) * 100).toFixed(1)}% (target: 90%)`);
+ }
+
+ // Failure analysis with --analyze flag
+ if (flags.analyze) {
+ console.log('\nπŸ” Failure Pattern Analysis:');
+
+ // Analyze failures by agent
+ const failures = system.verificationHistory.filter(v => !v.passed);
+ if (failures.length > 0) {
+ const failuresByAgent = {};
+ for (const f of failures) {
+ failuresByAgent[f.agentType] = (failuresByAgent[f.agentType] || 0) + 1;
+ }
+
+ console.log(' Failures by Agent:');
+ for (const [agent, count] of Object.entries(failuresByAgent)) {
+ const percentage = (count / failures.length * 100).toFixed(1);
+ console.log(` β€’ ${agent}: ${count} failures (${percentage}%)`);
+ }
+
+ // Common failure scores
+ const failureScores = failures.map(f => f.score);
+ const avgFailureScore = failureScores.reduce((a, b) => a + b, 0) / failureScores.length;
+ console.log(`\n Average Failure Score: ${avgFailureScore.toFixed(3)}`);
+ console.log(` Score Gap to Threshold: ${(report.threshold - avgFailureScore).toFixed(3)}`);
+
+ // Recommendations
+ console.log('\nπŸ’‘ Recommendations:');
+ if (avgFailureScore < 0.5) {
+ console.log(' β€’ Critical: Major quality issues detected');
+ console.log(' β€’ Consider switching to development mode for debugging');
+ console.log(' β€’ Review agent configurations and requirements');
+ } else if (avgFailureScore < report.threshold) {
+ console.log(' β€’ Moderate: Close to threshold but needs improvement');
+ console.log(' β€’ Focus on failing agents: ' + Object.keys(failuresByAgent).join(', '));
+ console.log(' β€’ Consider adjusting verification requirements');
+ }
+ } else {
+ console.log(' βœ… No failures detected!');
+ }
+ }
+
+ // JSON output
+ if (flags.json) {
+ console.log('\nπŸ“„ JSON Output:');
+ console.log(JSON.stringify(report, null, 2));
+ }
break;
case 'status':