v2/docs/development/pair-optimization.md
The pair programming command was running verification checks continuously every 30 seconds, causing:
setInterval ran verification every 30 seconds automatically/verify command bypasses cooldown// Old: Binary pass/fail (0.5 or 1.0)
const score = passed ? 1.0 : 0.5;
// New: Graduated scoring based on error count
if (output.includes('error')) {
const errorCount = (output.match(/error/gi) || []).length;
score = Math.max(0.2, 1.0 - (errorCount * 0.1));
} else if (output.includes('warning')) {
const warningCount = (output.match(/warning/gi) || []).length;
score = Math.max(0.7, 1.0 - (warningCount * 0.05));
}
isVerifying flag to prevent multiple simultaneous checks/verify - Run verification manually/auto - Toggle automatic verification on/off/metrics - View verification history/status - Check current settings# Start with manual verification only
./claude-flow pair --start --verify
# Run verification when needed
/verify
# Enable auto-verify with 60s cooldown
./claude-flow pair --start --verify --auto
# Toggle during session
/auto
# Enable testing without auto-run
./claude-flow pair --start --test
# Run tests manually
/test
| Command | Description | Auto-Verify Impact |
|---|---|---|
/verify | Run verification now | Bypasses cooldown |
/test | Run tests now | Independent |
/auto | Toggle auto-verify | Enables/disables |
/status | Show settings | No impact |
/metrics | Show history | No impact |
/commit | Pre-commit check | Runs verification |
| Flag | Default | Description |
|---|---|---|
--verify | false | Enable verification system |
--auto | false | Enable automatic verification |
--test | false | Enable test system |
--threshold | 0.95 | Verification pass threshold |
--verify without --auto/commit command/metrics to track trends{
"id": "pair_1755038032183",
"mode": "switch",
"verify": true,
"autoVerify": false,
"verificationScores": [
{
"score": 0.82,
"timestamp": 1755038045000,
"results": [
{ "name": "Type Check", "score": 0.8 },
{ "name": "Linting", "score": 0.85 },
{ "name": "Build", "score": 0.82 }
]
}
]
}