Install
$ agentstack add skill-brifl-coding-agent-orchestration-continuous-refactor ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
continuous-refactor
Purpose
Run the continuous-refactor workflow in continuous mode until the dispatcher returns recommended_role: stop (only [MINOR] refactoring ideas remain).
The workflow rotates through three prompt steps in a strict cycle:
prompt.refactor_scan— identify code smells and refactoring candidatesprompt.refactor_execute— apply selected refactoringsprompt.refactor_verify— verify refactored code 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:
# 1. Ask the dispatcher for the next prompt
python3 .codex/skills/vibe-loop/scripts/agentctl.py --repo-root . --format json next --workflow continuous-refactor
# 2. Read the prompt body from the catalog
python3 .codex/skills/vibe-prompts/scripts/prompt_catalog.py .codex/skills/vibe-prompts/resources/template_prompts.md get
# 3. Execute the prompt body (do the actual refactoring work)
# 4. After execution, record the loop result
python3 .codex/skills/vibe-loop/scripts/agentctl.py --repo-root . --format json loop-result --line "LOOP_RESULT: "
# 5. Repeat from step 1 until recommended_role == "stop"
The --workflow continuous-refactor flag is required — it activates the continuous override that ignores normal plan-state routing and selects from the refactor prompt rotation instead.
LOOP_RESULT format
After executing each prompt, emit a LOOP_RESULT JSON line with these required fields:
{
"loop": "implement",
"result": "ready_for_review",
"stage": "",
"checkpoint": "",
"status": "",
"next_role_hint": "implement|review|stop",
"report": {
"acceptance_matrix": [],
"top_findings": [
{"impact": "MAJOR|MODERATE|MINOR", "title": "...", "evidence": "...", "action": "..."}
]
}
}
Use impact tags ([MAJOR], [MODERATE], [MINOR]) in top_findings titles. The workflow stops when only [MINOR] ideas remain.
Scripts (wrapper)
scripts/continuous_refactor.py
Wraps vibe-run with --workflow continuous-refactor. Useful for terminal or headless modes:
# Interactive (terminal)
python3 .codex/skills/continuous-refactor/scripts/continuous_refactor.py --repo-root . --show-decision
# Headless dry-run
python3 .codex/skills/continuous-refactor/scripts/continuous_refactor.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.jsonentry) 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.
- Refer to
resources/refactoring-guide.mdfor code smell heuristics.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: brifl
- Source: brifl/coding-agent-orchestration
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.