dmx
Reference

Command Reference

dmx exposes its workflow as slash commands in your IDE. Every command is a skill: a Markdown file with frontmatter that defines its name, description, and arguments.

Commands are invoked as /dmx/{name} in any IDE connected to dmx via MCP.

Passing arguments

Type the command by itself, then give the required value as plain text right after it — the agent reads it as context for the command. For example:

/dmx/create-ticket

Add rate limiting to the public inference endpoint.

For optional arguments, just mention the value in your message (e.g. "type it as a chore") and the agent will pass it through, or your IDE may prompt you to fill it in directly. The tables below list every argument's name, whether it's required, and what it does, regardless of how your IDE collects it.


Workflow commands

init

/dmx/init

One-time project setup. Walks through workflow mode and ticketing configuration, auto-detects tech stack and GitHub settings, writes .dmx/config.md, and scaffolds the memory bank. In a pnpm, npm, yarn, go.work, uv, or Cargo workspace with two or more packages, it also offers to make each one a component. In a repo without components, it compares the test command dmx would run with your CI workflow, and offers a test_command when CI runs more. Safe to re-run. It updates config without overwriting memory bank files that already have content.

No arguments.


upgrade

/dmx/upgrade

Refreshes the dmx rule files in your repo (such as .cursor/rules/ or the dmx block in CLAUDE.md) to the workflow version of the installed dmx. Run it once after upgrading dmx, then open a new chat and commit the changed files. It covers every IDE that already has dmx rules in the repo, plus the one you're using.

In a repo still on the 0.5 layout, it then migrates it: this branch's root spec.md, tasks.md, and activeContext.md move into its job folder, an earlier ticket's leftovers are deleted (they stay in git history), each source vendored in .dmx/vendor/ is locked at the commit it recorded, and custom code that still names the old paths is listed first. It shows that plan and asks once.

Never runs on the integration or production branch, doesn't change .dmx/config.md, and doesn't commit. Content outside the dmx block in shared files like CLAUDE.md is left as it is. If everything is already current, it says so and changes nothing. See Upgrading dmx.

No arguments.


create-ticket

/dmx/create-ticket

Add rate limiting to the public inference endpoint.

Takes a short task description, reads project context from the memory bank, creates a ticket, creates a branch, checks it out, and scaffolds a spec.md pre-filled with project context. One command to go from idea to ready-to-implement.

The branch is created on GitHub from origin/{branch_base}, so the repository needs at least one commit pushed to origin first. On a repo with no commits, create-ticket stops before creating anything and tells you to commit and push.

ArgumentRequiredDescription
taskYesShort description of the work. Feature, bug, story, or chore. Type is inferred.
typeNoOverride the inferred branch/ticket type. feature, bug, or chore.
priorityNoJira priority: High, Medium, or Low. Defaults to Medium. Ignored for other providers.

derive-ticket

/dmx/derive-ticket

Reads uncommitted changes in the working tree, infers what was built, creates a ticket retroactively, creates a properly named branch, stashes and re-applies changes if on a protected branch, and scaffolds a derived spec.md.

ArgumentRequiredDescription
typeNoBranch type prefix. feature or bug. Defaults to feature.

hotfix

/dmx/hotfix

Creates a hotfix branch from the production branch for a production incident, scaffolds the spec, and transitions the ticket to In Progress.

ArgumentRequiredDescription
ticket_idNoTicket identifier. Jira: DM-123. GitHub Issues: 123. Omit when ticketing is none.
descriptionNoShort kebab-case description for the branch name. Auto-generated from ticket title if omitted.

plan

/dmx/plan

Reads the current branch's spec.md, validates all Q&A is complete, and generates a phased tasks.md. Opens the file in preview.

No arguments.


implement-next-phase

/dmx/implement-next-phase

Executes every task in the next unchecked phase of tasks.md, checking each off as it completes. Stops after the phase and waits for review. Never continues to the next phase automatically.

No arguments.


implement-next-task

/dmx/implement-next-task

Executes the single next unchecked task in tasks.md and stops. Use for fine-grained control when tasks are large or risky and you want to review each individually.

No arguments.


validate

/dmx/validate

Three-part quality gate before opening a PR: ticket completeness (spec, acceptance criteria, tasks), code quality (codebase patterns, style, naming), and security (vulnerabilities introduced by the diff). Produces a structured report with a READY FOR PR or NEEDS WORK verdict.

No arguments.


create-pr

/dmx/create-pr

Opens a GitHub pull request with the correct title format and drafted description, syncs the memory bank, then transitions the ticket to In Review.

ArgumentRequiredDescription
descriptionNoPR body markdown. If omitted, draft-pr-description is called automatically.
baseNoTarget branch. Defaults to branch_base from config; auto-detects production branch for hotfixes.
draftNoOpen the PR as a draft. Defaults to false.

prune-jobs

/dmx/prune-jobs

Removes finished job folders from .dmx/jobs/ in one commit, chore: remove N finished jobs, so .dmx/jobs/ doesn't grow forever. A job is removed when all its loop runs finished, it's on the integration branch (its PR merged), and its newest run finished more than 30 days ago. The current ticket, a job with an unfinished run, a job with learnings still waiting for their owner, and a job with uncommitted changes are always kept. Runs as the first step of the Release Loop; git history keeps every removed file.

ArgumentRequiredDescription
older_thanNoMinimum age, such as 7d. Defaults to 30d.

close-ticket

/dmx/close-ticket

After a PR is merged: transitions ticket to Done, adds PR link as a comment, deletes the branch locally and remotely, raises hotfix back-merge PRs if needed.

The ticket is only transitioned and commented on if a merged PR is found for the branch. If none is found, close-ticket warns and still deletes the branch, but leaves the ticket alone. A ticket that's already in a terminal state — a GitHub issue auto-closed by Closes #N, or a Jira ticket moved by an integration — is treated as done, not as an error.

ArgumentRequiredDescription
ticket_idNoAuto-detected from current branch name if omitted.
branchNoBranch to close out. Defaults to current branch.

Doesn't remove the ticket's job folder — it merged with the PR. The Release Loop's prune-jobs step removes finished jobs later.


draft-release-note

/dmx/draft-release-note

v0.3.0

Generates structured release notes by diffing merged PRs and commits between the last published release and current HEAD. Enriches entries with ticket data.

Writes the notes to .dmx/releases/{version}.md, then commits and pushes the file so release-merge includes it in the release PR. Re-running it when the content hasn't changed is a no-op.

ArgumentRequiredDescription
versionYesVersion number for this release, e.g. v0.3.0.
sinceNoOverride the baseline tag. Defaults to the most recent git tag.

release-merge

/dmx/release-merge

v0.3.0

Opens a PR from the integration branch to the production branch as the formal release gate. Reads release notes from .dmx/releases/{version}.md if already drafted.

ArgumentRequiredDescription
versionYesVersion number, e.g. v0.3.0.

create-release

/dmx/create-release

v0.3.0

Tags the production branch and publishes a GitHub release. Run only after the release-merge PR has been merged.

ArgumentRequiredDescription
versionYesVersion tag, e.g. v0.3.0. Must start with v followed by semver.
prereleaseNoMark as pre-release on GitHub. Defaults to false.

Utility commands

add-component

/dmx/add-component

Makes one folder of a monorepo a component. Recognizes a Go module or package, a Node package, a Python project, or a Rust crate and fills in the id and description; any other folder is named after itself and gets a test command to fill in. Shows the planned component.yaml and asks once, offers to move repo-wide memory about it into its folder, and prints the CODEOWNERS line. A taken id is never reused. Doesn't commit.

ArgumentRequiredDescription
pathYesThe folder, such as services/fraud.
idNoThe component id. Defaults to the package, module, project, or crate name, else the folder name.
descriptionNoDefaults to the manifest's description.

extend

/dmx/extend

Adds or changes a skill, loop or validator, for the repo, a shared source or one component. It tells the agent where each file goes, the format of a skill, every loop field (including rework), the validator contract (what a validator reads, what it prints, its exit codes, findings and reworkable), and how to check the result with dmx check. The agent follows it whenever you ask for one of these, so it doesn't have to work the formats out.

ArgumentRequiredDescription
whatNoWhat to add, in a sentence, such as "a review loop for the payments component that fails on unclosed resources".

check

/dmx/check

Checks the dmx setup and shows what the current branch will load, check, and run. The same report as dmx check on the command line. Never changes a file.

No arguments.


commit

/dmx/commit

Stages changes, refreshes the memory bank with light progress updates, and creates a Conventional Commits formatted message referencing the current ticket. Never auto-pushes.

ArgumentRequiredDescription
messageNoOverride the generated commit summary.
typeNoConventional Commits type. Inferred from branch prefix if omitted. Values: feat, fix, refactor, chore, docs, test, style, perf, ci, build.
scopeNoOptional scope in parentheses, e.g. auth, api, db.
bodyNoOptional multi-line explanation added after the summary line.
stage_allNoIf true (default), runs git add . before committing. Set to false to commit only already-staged files.

create-branch

/dmx/create-branch

Creates a properly named branch, scaffolds the ticket spec in the memory bank, and transitions the ticket to In Progress.

ArgumentRequiredDescription
ticket_idNoTicket identifier. Omit when ticketing is none.
typeNoBranch type prefix. feature or bug. Defaults to feature.
descriptionNoShort kebab-case description for the branch name. Auto-generated from the ticket title if omitted.

draft-pr-description

/dmx/draft-pr-description

Generates the PR body from the current branch's commits, diff, and ticket. Available standalone to preview before opening a PR. Called automatically by create-pr.

ArgumentRequiredDescription
baseNoBase branch to diff against. Defaults to branch_base from config.

status

/dmx/status

Shows a snapshot of in-progress tickets and open pull requests.

ArgumentRequiredDescription
repo_onlyNoShow only GitHub PR status, skip tickets. Defaults to false.

sync-branch

/dmx/sync-branch

Rebases (or merges) the latest integration branch onto the current feature or bug branch. Pushes the result to origin.

ArgumentRequiredDescription
strategyNoIntegration strategy. rebase (default) or merge.

update-shared-sources

/dmx/update-shared-sources

Locks the shared sources declared in .dmx/shared-sources.yaml: looks up each new or changed source's ref, fetches and checks its tree, and writes .dmx/shared-sources.lock with the commit and a content hash. Warns about same-name collisions, commits and pushes the lock, and returns a summary for the PR with a compare link and the skills, loops, and validators that changed. Every other source keeps its locked commit.

Blocked on the integration branch — run it on a branch and open a PR. If a source fails, it reports which one and why, and asks before committing the rest. /dmx/sync is an alias in 0.6 and 0.7.

ArgumentRequiredDescription
sourcesNoComma-separated source names to look up again even if their lock entry is current.
allNotrue to look up every source again.
componentNoA component id, to update that component's own sources instead.

update-memory

/dmx/update-memory

Reviews the ticket's spec.md, tasks.md, and activeContext.md learning inbox; extracts durable project learnings; reconciles contradictions; syncs into core memory bank files. Commits its own changes (chore: sync memory bank), so it never leaves .dmx/ edits uncommitted. Use on demand. commit and create-pr handle automatic updates during normal workflow.

ArgumentRequiredDescription
targetNoIn a monorepo, a component id or repo-wide: fold that owner's learnings waiting in earlier tickets into its memory.

Specialist commands

docs

/dmx/docs

src/api/rate_limiter.py

Writes clear, human-first documentation: purpose, parameters, return values, and examples. Uses the idiomatic docstring style for the language.

ArgumentRequiredDescription
pathYesFile or module to document.
styleNodocstrings (default), readme, api, or all.
audienceNoIntended reader. developer (default), user, or both.

review

/dmx/review

Reviews code with precision and respect. Focuses on clarity, correctness, maintainability, and functional design. Feedback is actionable, concise, and kind.

ArgumentRequiredDescription
pathNoFile or directory to review. Defaults to the current staged diff.
focusNoFocus area: correctness, maintainability, performance, naming, or all. Defaults to all.

secure

/dmx/secure

Analyzes code for vulnerabilities, unsafe patterns, and bad practices. Produces a risk-rated finding list with concrete remediation steps.

ArgumentRequiredDescription
pathNoFile or directory to analyze. Defaults to the current staged diff.
severityNoMinimum severity to report: critical, high, medium, low, or all. Defaults to all.

test

/dmx/test

src/api/rate_limiter.py

Writes tests that enable change. Prioritizes unit tests, covers edge cases and failure modes, uses property-based tests where useful.

ArgumentRequiredDescription
pathYesFile or module to write tests for.
styleNounit (default), integration, property, or all.
frameworkNoTest framework to use. Auto-detected from the project if omitted (e.g. pytest, jest, vitest).

Loop runtime commands

run-loop

/dmx/run-loop

spec

Add rate limiting to the public inference endpoint.

Starts a dmx loop by name. Reads the loop config from .dmx/loops/{name}.yaml (or a shared source, or the bundled default), initializes job and task state, and runs the first skill. Any description given after the loop name is passed to that first skill as context — for the spec loop, this description becomes the task description that create-ticket uses to scaffold the ticket, branch, and spec.

ArgumentRequiredDescription
loopYesName of the loop to run: spec, plan, dev, validate, release, any custom loop in .dmx/loops/ or a shared source, or a component's loop such as ledger/backfill.

loop-continue

/dmx/loop-continue

Resumes a paused dmx loop after human review at a gate. Advances past the current pause point and runs the next skill (or the validators, if all skills are complete). On a loop paused for rework approval, it starts the rework.

No arguments.


rework

/dmx/rework

Turns the failed required checks of a paused loop into a rework phase in tasks.md, the same way on_failure.rework does, for a loop that doesn't set it. With approval on (the default), the loop waits for /dmx/loop-continue; then the rework loop implements the phase and the failed loop runs again from its first skill. On a loop that used up its rework rounds, it allows more. It refuses when a failure can't become a code task, and says which.

ArgumentRequiredDescription
loopNoThe loop that does the fixing. Defaults to dev.
max_roundsNoRework rounds to allow. Defaults to 2.

Command-line commands

The dmx package also installs a command-line tool. Run it from anywhere in the repo; it finds the repo's .dmx/ from there.

dmx check

Validates the setup and shows what the current branch will load, check, and run. Never changes a file, and exits 1 when there is an error, so CI can run it.

$ dmx check
Setup
  ✓ 4 components
  ✗ payments: depends_on "ledgr" is not a component (fix depends_on in .dmx/components/payments/component.yaml)
  ! services/fraud has no component (run /dmx/add-component services/fraud)
  i ledger: 3 learnings waiting (run /dmx/update-memory ledger)

This branch (feature-gh-412)
  Components: ledger (spec), payments (depends on ledger)
  Loads:      .dmx/systemPatterns.md
              .dmx/components/ledger/systemPatterns.md
  Validators: validate: run_tests, spec_adherence, ledger/no_float_money
  Runs:       ledger — go test ./services/ledger/...
              payments — go test ./... in services/payments

Errors (✗) cover broken component.yaml files, unknown or circular depends_on, overlapping or stale paths, components with no test command, shared-source locks that don't match shared-sources.yaml, and learnings tagged for a component that doesn't exist. Warnings (!) cover missing toolchains, workspace packages with no component, missing CODEOWNERS lines, no test_command, stray .dmx/ folders, and custom code that still names old paths. It also reports the GitHub access /dmx/init recorded, and errors when it's the gh CLI and that isn't installed or signed in. Info lines (i) list known test failures. Each line ends with what fixes it.

dmx fetch-shared-sources

Fetches every locked shared source, repo-wide and per component, into .dmx/.cache/ without changing a lock. For CI and fresh clones. Exits 1 if a source isn't locked for its current address or can't be fetched.

dmx prune-jobs

Removes finished jobs by hand, with the same rules as the prune-jobs step. --older-than 7d sets the age, and --dry-run shows what would go and why each other job stays.

On this page