| name | continuous-test-generation |
| description | Continuous runner for the continuous-test-generation workflow across supported agents. |
continuous-test-generation
Purpose
Run the continuous-test-generation workflow in continuous mode until the
dispatcher returns recommended_role: stop (only [MINOR] test gaps remain).
The workflow rotates through three prompt steps in a strict cycle:
prompt.test_gap_analysis — identify untested code paths (runs every 3rd checkpoint)
prompt.test_generation — generate tests for identified gaps
prompt.test_review — review generated tests for correctness
Cold starts are handled automatically — the infrastructure initialises the
rotation at step 1 when no prior runtime entry exists.
Agent execution protocol
Run one dispatcher step at a time:
python3 .codex/skills/vibe-loop/scripts/agentctl.py --repo-root . --format json next --workflow continuous-test-generation
python3 .codex/skills/vibe-prompts/scripts/prompt_catalog.py <prompt_catalog_path> get <recommended_prompt_id>
python3 .codex/skills/vibe-loop/scripts/agentctl.py --repo-root . --format json loop-result --line "LOOP_RESULT: <json>"
The --workflow continuous-test-generation flag is required — it activates
the continuous override that ignores normal plan-state routing and selects from
the test generation prompt rotation instead.
In this orchestration source repo, use tools/agentctl.py and tools/prompt_catalog.py
instead; the .codex runtime helper scripts are generated during install.
LOOP_RESULT format
After executing each prompt, emit a LOOP_RESULT JSON line with the dispatcher-required
report fields:
{
"loop": "implement",
"result": "ready_for_review",
"stage": "<current_stage>",
"checkpoint": "<current_checkpoint>",
"status": "<current_status>",
"next_role_hint": "implement|review|stop",
"workflow": "continuous-test-generation",
"report": {
"acceptance_matrix": [
{
"item": "<checked behavior>",
"status": "PASS|FAIL|N/A",
"evidence": "<command or file evidence>",
"critical": true,
"confidence": 0.9,
"evidence_strength": "LOW|MEDIUM|HIGH"
}
],
"top_findings": [
{"impact": "MAJOR|MINOR", "title": "[MAJOR|MODERATE|MINOR] ...", "evidence": "...", "action": "..."}
],
"state_transition": {
"before": {"stage": "<current_stage>", "checkpoint": "<current_checkpoint>", "status": "<previous_status>"},
"after": {"stage": "<current_stage>", "checkpoint": "<current_checkpoint>", "status": "<current_status>"}
},
"loop_result": {
"loop": "implement",
"result": "ready_for_review",
"stage": "<current_stage>",
"checkpoint": "<current_checkpoint>",
"status": "<current_status>",
"next_role_hint": "implement|review|stop"
}
}
}
Use idea impact tags ([MAJOR], [MODERATE], [MINOR]) in top_findings titles.
The structured impact field follows the dispatcher impact schema; use the title tag
for the continuous-workflow major/moderate/minor idea threshold.
The workflow stops when only [MINOR] test gaps remain.
Scripts (wrapper)
scripts/continuous_test_generation.py
Wraps vibe-run with --workflow continuous-test-generation. Useful for
terminal or headless modes:
python3 .codex/skills/continuous-test-generation/scripts/continuous_test_generation.py --repo-root . --show-decision
python3 .codex/skills/continuous-test-generation/scripts/continuous_test_generation.py --repo-root . --non-interactive --simulate-loop-result --max-loops 10 --show-decision
Notes
- Uses the same LOOP_RESULT acknowledgement flow as
vibe-run.
- The dispatcher handles cold starts (no
workflow_runtime.json entry) by
starting the rotation at step 1 — no manual initialisation is needed.
- If the dispatcher returns
requires_loop_result: true, record the pending
LOOP_RESULT before calling next again.
test_gap_analysis has an every: 3 frequency gate — the dispatcher
automatically skips it on non-matching checkpoints and rotates to the next
eligible step.
- Refer to
resources/test-generation-guide.md for high-value test target
heuristics.