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 and waits for your review of the implementation
- On
/dmx/loop-continue, commits staged changes with a Conventional Commits message, then stops again for a second review - On the next
/dmx/loop-continue, checks whether all phases are complete; if not, repeats from step 1 - 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 devThe human gate
human_gate: true gates every skill, not just every phase — with two skills in the loop, each phase iteration pauses twice:
-
After
implement-next-phase. Review the code changes, then continue:/dmx/loop-continue -
After
commit. Confirm the commit looks right, then continue again:/dmx/loop-continueThis second continue is also what triggers the
all_phases_completecheck: if phases remain, the next phase'simplement-next-phasestarts immediately; if 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 |
The bundled loop gives the test run up to 630 seconds (timeout_seconds). For a slower suite, raise it in your own copy of the loop. See timeout_seconds.
The bundled run_tests doesn't measure coverage. To enforce a coverage threshold, override run_tests and add the check to your own loop YAML.
If your test command isn't detected, place a custom validators/run_tests.py at your repo root. See Writing Validators.
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
timeout_seconds: 630
checks:
- name: tests_pass
required: true
on_optional_failure: warn
failure_handling: pause
human_gate: true
on_complete:
on_success:
trigger_loop: validateTips
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.