plugins/ruflo-testgen/README.md
Test gap detection, coverage analysis, and automated test generation. SPARC Refinement-phase canonical owner.
/plugin marketplace add ruvnet/ruflo
/plugin install ruflo-testgen@ruflo
ruflo-core plugin (provides MCP server)@claude-flow/cli v3.6 major+minor.bash plugins/ruflo-testgen/scripts/smoke.sh is the contract.This plugin's two MCP/CLI surfaces:
| Surface | Invocation |
|---|---|
MCP: dispatch the testgaps worker | mcp tool call hooks_worker-dispatch --json -- '{"trigger":"testgaps"}' |
CLI: coverage-gaps (table of gaps) | npx @claude-flow/cli@latest hooks coverage-gaps --format table --limit 20 |
CLI: coverage-route (route a task by gap) | npx @claude-flow/cli@latest hooks coverage-route --task "add auth tests" |
CLI: coverage-suggest (suggest tests for a path) | npx @claude-flow/cli@latest hooks coverage-suggest --path src/ |
testgaps is one of 12 background workers documented in ruflo-loop-workers ADR-0001.
This plugin owns the Refinement phase per ruflo-sparc ADR-0001 §"Phase-to-plugin alignment". When SPARC's sparc-refine skill runs, it composes:
Together they enforce the Refinement gate: ≥80% coverage on new code + diff risk score below threshold.
This plugin owns the test-gaps AgentDB namespace (kebab-case, follows the convention from ruflo-agentdb ADR-0001 §"Namespace convention"). Reserved namespaces (pattern, claude-memories, default) MUST NOT be shadowed.
test-gaps indexes detected gaps by file + priority + last-seen timestamp. Accessed via memory_* (namespace-routed).
bash plugins/ruflo-testgen/scripts/smoke.sh
# Expected: "10 passed, 0 failed"
ruflo-loop-workers — defines the testgaps background workerruflo-sparc — Refinement-phase canonical handoffruflo-jujutsu — diff-aware refactor companion in the Refinement gateruflo-agentdb — namespace convention owner