Dev Loop
The Dev Loop executes the implementation plan phase by phase. It repeats until all phases are complete, then validates the output and hands off to the Validate Loop.
What it does
Each iteration:
- Identifies the next unchecked phase in
tasks.md - Executes every task in that phase, checking each off as it completes
- Stops after the phase and waits for your review
- Commits staged changes with a Conventional Commits message
- Checks whether all phases are complete; if not, repeats
- Runs validators when all phases are done
- Chains to the Validate Loop on success
How to start it
The Dev Loop fires automatically when the Plan Loop completes. You can also run it manually:
/dmx/run-loop dev
The human gate
After each phase, the loop pauses. Review the code changes. When you're satisfied:
/dmx/loop-continue
The loop checks whether all phases are complete. If not, it starts the next phase immediately. When all phases are done, validators run.
repeat_until: all_phases_complete
This property tells the orchestrator to iterate the skill sequence until the condition is met. After each iteration, dmx reads tasks.md and checks for unchecked - [ ] items. If any remain, the loop repeats. When all items are - [x], validators run.
Skills
implement-next-phase executes all tasks in the next unchecked phase of tasks.md. The AI implements the code, checks off each task, and stops. It never continues to the next phase automatically.
commit stages changes, updates the memory bank with light progress notes, and creates a Conventional Commits message referencing the current ticket. It never auto-pushes.
For finer control, you can customize the Dev Loop to use implement-next-task instead of implement-next-phase. This implements one task at a time, which is useful when individual tasks are large or risky.
Validators
run_tests
Detects and runs your project's test suite. Detection is automatic:
- Python +
pyproject.toml+uv.lock→uv run pytest -q - Python +
pyproject.toml→pytest -q - Node.js +
package.jsontest script →npm test --silent - Makefile with
test:target →make test
| Check | Required |
|---|---|
tests_pass | Yes |
coverage_threshold | No |
If your test command isn't detected, place a custom validators/run_tests.py at your repo root. See Writing Validators.
spec_adherence
Grades the structured validation-report.json that the validate skill writes from its own diff analysis — not free-text skill output. See Validators for the full check logic.
| Check | Required |
|---|---|
scope_matches_spec | Yes |
edge_cases_addressed | No |
If the report is missing or stale, every check fails and the loop pauses with a message to re-run /dmx/validate first.
Loop config
name: dev
skills:
- implement-next-phase
- commit
trigger:
type: on_complete
goal_state: "All phases implemented and committed, no unchecked tasks remaining"
repeat_until: all_phases_complete
validators:
- tool: run_tests
checks:
- name: tests_pass
required: true
- name: coverage_threshold
required: false
- tool: spec_adherence
checks:
- name: scope_matches_spec
required: true
- name: edge_cases_addressed
required: false
on_optional_failure: warn
failure_handling: pause
human_gate: true
on_complete:
on_success:
trigger_loop: validate
Tips
Review each phase before continuing. The AI implements the full phase in one go. Read the diff before calling /dmx/loop-continue. Fix anything wrong before the next phase runs.
Let tests fail naturally. If run_tests fails, the loop pauses. Fix the failing tests, then continue. Don't bypass the validator. Test failures are exactly what the harness is designed to catch.