v3.14.0

ruvnet/ruflov3.14.0Jun 22, 2026by ruvnet

AI Summary

MINOR release introducing Test-Driven Repair, allowing the CLI to automatically fix failing tests using headless claude -p with safety constraints.

Key Highlights

  • Added 'ruflo hooks testgen tdd-repair' command for automated debugging
  • Implemented automated test fix loop with budget caps and safety posture
  • Added smoke proof fixture for the TDD repair feature

New Features

  • Test-Driven Repair via headless claude -p

Full Release Notes

## ✨ New feature — Test-Driven Repair

Closes the loop the existing TDD plugins didn't: we generate tests; now we also fix the code to satisfy them. Inspired by [agent-harness-generator ADR-175](https://github.com/ruvnet/agent-harness-generator/tree/main/packages/darwin-mode); implemented via headless \`claude -p\` for tighter integration with our stack.

### What you can do now

\`\`\`bash
# Failing CI test → verified fix PR for pennies
npx ruflo@latest hooks testgen tdd-repair \
  --repo . \
  --test tests/failing.test.ts \
  --test-command "npx vitest run tests/failing.test.ts" \
  --confirm
\`\`\`

Or call \`mcp__claude-flow__testgen_tdd_repair\` from any agent.

### How it works
1. Pre-flight: run the test command. Refuse if it already passes (catches \`--test-command\` typos).
2. Spawn \`claude -p\` with capability-restricted toolset (\`--allowedTools Read,Edit,Bash\`) and hard-capped budget (\`--max-budget-usd\`).
3. Focused prompt: read the failing test, fix the source, do NOT modify the test, verify by running it.
4. Re-run the test. The exit code IS the fitness function — no LLM-as-judge.
5. If green: emit success + per-attempt usage (\`cost_usd\`). If red after \`--max-attempts\`: emit failure receipts; workspace left as-is for review.

### Safety posture
- \`--confirm\` REQUIRED (dry-run otherwise)
- Hard \`--max-budget-usd\` cap (default $5)
- \`--allowedTools Read,Edit,Bash\` (no MCP, no network, no arbitrary writes)
- Prompt forbids modifying the test or adding dependencies
- 15 min hard timeout

### Smoke proof
\`docs/benchmarks/tdd-repair/SMOKE-2026-06-22.md\` — built fixture with \`add(a,b) → a-b\` bug; pre-repair 2/2 fail, post-repair 2/2 pass.

### Cost ladder
| Tier | Model | Per-attempt typical |
|---|---|---:|
| 1 | Haiku (default) | \$0.02 – \$0.20 |
| 2 | Sonnet | \$0.30 – \$2.00 |
| 3 | Opus | \$1.50 – \$8.00 |

### Conformant mode (\`--no-test-oracle\`)
Scoped for a follow-up ADR. Today \`--no-test-oracle\` returns a clear config error.

### Distribution

| Package | latest | alpha | v3alpha |
|---|---|---|---|
| \`@claude-flow/cli\` | 3.14.0 | 3.14.0 | 3.14.0 |
| \`claude-flow\` | 3.14.0 | 3.14.0 | 3.14.0 |
| \`ruflo\` | 3.14.0 | 3.14.0 | 3.14.0 |

### Cross-references
- 🔗 Inspired by: agent-harness-generator/packages/darwin-mode ADR-175
- 🔗 Smoke receipts: docs/benchmarks/tdd-repair/SMOKE-2026-06-22.md
- 🔗 Companion: testgen \`test-gaps\` skill (gap → fix loop scoped for next iteration)

---
🤖 Generated with [RuFlo](https://github.com/ruvnet/ruflo)