π 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
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
π Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/verification.js
rUvcf8f38c29de7
diff --git a/.claude/checkpoints/task-1755013154.json b/.claude/checkpoints/task-1755013154.jsonnew file mode 100644index 0000000000..83ab85c99f--- /dev/null+++ b/.claude/checkpoints/task-1755013154.json@@ -0,0 +1 @@+{"checkpoint": "task-20250812-153913", "task": "@ruvnet β /workspaces/claude-code-flow (alpha-89) $ ./claude-flow truth --agent coder --detailed ", "timestamp": "2025-08-12T15:39:14Z", "commit": "72e39496bbba90aa58343da5eabeb176ed0b8d19", "github_release": "true"}diff --git a/src/cli/simple-commands/verification.js b/src/cli/simple-commands/verification.jsindex 36bfeb551f..43c6b1b63b 100644--- a/src/cli/simple-commands/verification.js+++ b/src/cli/simple-commands/verification.js@@ -226,19 +226,86 @@ export async function verificationCommand(args, flags) {case 'truth':case 'score':await system.loadMemory();- const report = await system.generateTruthReport();++ // Filter by agent if specified+ let filteredHistory = system.verificationHistory;+ if (flags.agent) {+ filteredHistory = system.verificationHistory.filter(v => v.agentType === flags.agent);+ if (filteredHistory.length === 0) {+ console.log(`\nβ οΈ No verification history found for agent: ${flags.agent}`);+ return;+ }+ }++ // Generate report (with filtered data if agent specified)+ const report = flags.agent ?+ await generateFilteredReport(system, filteredHistory, flags.agent) :+ await system.generateTruthReport();// Basic report (always shown)- console.log('\nπ Truth Scoring Report');+ console.log('\nπ Truth Scoring Report' + (flags.agent ? ` - Agent: ${flags.agent}` : ''));console.log('β'.repeat(50));- console.log(`Mode: ${report.mode}`);- console.log(`Threshold: ${report.threshold}`);+ console.log(`Mode: ${report.mode || system.mode}`);+ console.log(`Threshold: ${report.threshold || VERIFICATION_MODES[system.mode].threshold}`);console.log(`Total Verifications: ${report.totalVerifications}`);console.log(`Passed: ${report.passedVerifications}`);console.log(`Average Score: ${report.averageScore.toFixed(3)}`);- console.log('\nπ€ Agent Reliability:');- for (const [agent, reliability] of Object.entries(report.agentReliability)) {- console.log(` ${agent}: ${(reliability * 100).toFixed(1)}%`);++ if (flags.agent) {+ // Show detailed info for specific agent+ console.log(`\nπ€ ${flags.agent} Agent Details:`);+ console.log(` Reliability: ${(report.agentReliability[flags.agent] * 100).toFixed(1)}%`);+ console.log(` Total Tasks: ${filteredHistory.length}`);+ console.log(` Passed: ${filteredHistory.filter(v => v.passed).length}`);+ console.log(` Failed: ${filteredHistory.filter(v => !v.passed).length}`);++ if (flags.detailed || flags.detail) {+ console.log('\nπ Verification History:');+ const recentAgent = filteredHistory.slice(-10);+ for (const v of recentAgent) {+ const time = new Date(v.timestamp).toLocaleTimeString();+ console.log(` ${v.passed ? 'β ' : 'β'} [${time}] ${v.taskId}: ${v.score.toFixed(3)}`);+ if (v.results && flags.verbose) {+ for (const [check, result] of Object.entries(v.results)) {+ console.log(` β’ ${check}: ${result.passed ? 'β' : 'β'} (${result.score.toFixed(2)})`);+ }+ }+ }++ // Score distribution+ const scores = filteredHistory.map(v => v.score);+ const minScore = Math.min(...scores);+ const maxScore = Math.max(...scores);+ console.log('\nπ Score Distribution:');+ console.log(` Min Score: ${minScore.toFixed(3)}`);+ console.log(` Max Score: ${maxScore.toFixed(3)}`);+ console.log(` Average: ${report.averageScore.toFixed(3)}`);++ // Performance trend+ if (filteredHistory.length > 5) {+ const recent5 = filteredHistory.slice(-5);+ const older5 = filteredHistory.slice(-10, -5);+ const recentAvg = recent5.reduce((sum, v) => sum + v.score, 0) / recent5.length;+ const olderAvg = older5.length > 0 ?+ older5.reduce((sum, v) => sum + v.score, 0) / older5.length : 0;++ console.log('\nπ Performance Trend:');+ if (olderAvg > 0) {+ const trend = recentAvg - olderAvg;+ const trendSymbol = trend > 0 ? 'β' : trend < 0 ? 'β' : 'β';+ console.log(` Recent Average: ${recentAvg.toFixed(3)} ${trendSymbol}`);+ console.log(` Previous Average: ${olderAvg.toFixed(3)}`);+ console.log(` Change: ${trend >= 0 ? '+' : ''}${(trend * 100).toFixed(1)}%`);+ } else {+ console.log(` Recent Average: ${recentAvg.toFixed(3)}`);+ }+ }+ }+ } else {+ console.log('\nπ€ Agent Reliability:');+ for (const [agent, reliability] of Object.entries(report.agentReliability)) {+ console.log(` ${agent}: ${(reliability * 100).toFixed(1)}%`);+ }}// Detailed report with --report flag