dmx
Configuration

Memory Bank

The memory bank is how dmx gives every AI session the same project context. It's a set of files in .dmx/ committed to your repository.

Why it exists

AI coding assistants are stateless. Every new session starts with no knowledge of your project: its architecture, its conventions, its decisions, its quirks. Developers work around this by pasting context into prompts, maintaining a CLAUDE.md or .cursorrules file, or just repeating themselves.

The dmx memory bank is a structured version of this context, maintained automatically as a side-effect of your workflow.

The .dmx/ directory structure

.dmx/
├── config.md              # Project configuration (set by /dmx/init)
├── projectbrief.md        # Project goals and scope
├── productContext.md      # User-facing behavior and flows
├── systemPatterns.md      # Architecture patterns, conventions
├── techContext.md         # Tech stack, dependencies, build system
├── shared-sources.yaml    # Org-wide shared sources (optional)
├── shared-sources.lock    # Their locked commits, written by /dmx/update-shared-sources
├── loops/                 # Custom loop configs (optional)
│   └── *.yaml
├── skills/                # Custom skills (optional)
│   └── *.md
├── components/            # Monorepos only: one folder per service or package
│   └── {id}/
│       ├── component.yaml # Description, paths, depends_on, test, validators, ticket
│       └── *.md           # Memory about that component
├── jobs/                  # One folder per ticket
│   └── {job_id}/
│       ├── spec.md        # The ticket's requirements, Q&A and approach
│       ├── tasks.md       # Its phased plan
│       ├── activeContext.md   # Its learning inbox
│       └── {loop}-{task_id}.json  # Loop runs (also the active-run signal)
├── releases/              # Drafted release notes (optional)
│   └── {version}.md
└── .cache/                # Fetched shared sources (git-ignored)

Core memory files

config.md

Set by /dmx/init. Contains your project configuration:

  • Workflow mode (Jira / GitHub Issues / none)
  • Ticketing system credentials and project key
  • Branch naming conventions
  • Protected branches
  • Tech stack auto-detected from the repository

Re-run /dmx/init to update this file if your configuration changes. To refresh dmx's rule files after upgrading dmx, run /dmx/upgrade instead. See Upgrading dmx.

projectbrief.md

Project goals and scope: what this project is trying to achieve, and what is and isn't part of it. Written by /dmx/init from your README and project files. Durable — updated rarely, usually only when project goals shift.

productContext.md

User-facing behavior and flows: why the project exists, how it works from a user's perspective, and who uses it. Written by /dmx/init. Updated by /dmx/create-pr and /dmx/update-memory when features ship that change user-facing behavior.

systemPatterns.md

Documents architecture decisions, code patterns, and conventions. Examples:

  • "We use repository pattern for data access"
  • "All API endpoints validate input with Pydantic v2"
  • "Tests use pytest fixtures, not setUp/tearDown"
  • "Background tasks go in tasks/ and are registered in tasks/__init__.py"

The more specific this file is, the better the AI's output aligns with your existing codebase.

techContext.md

Describes the tech stack, dependencies, and build system. The AI reads this at the start of every session to understand what libraries are in use, what the test framework is, and how the project is built.

Updated automatically during /dmx/commit and /dmx/create-pr, and reconciled by /dmx/update-memory.

Ticket files

Each ticket keeps three files in its own job folder, .dmx/jobs/<job>/, so two tickets never edit the same file and parallel PRs merge without conflicts. The job is the folder whose spec.md names the current branch in its frontmatter; loop messages name it too (Ticket files: .dmx/jobs/GH-412/spec.md, …).

spec.md and tasks.md

The ticket's spec and its phased plan. Created by create-ticket and plan, and used throughout the Spec, Plan, and Dev Loops. They're committed with the branch, so reviewers see them, and they stay in the job folder after the PR merges until prune-jobs removes finished jobs.

activeContext.md

The ticket's learning inbox. It has three sections:

  • Open Learnings — observations from the current stretch of work not yet promoted to a durable file
  • Open Decisions — unresolved trade-offs or design questions
  • Session Notes — a short, rolling log (most recent 10 entries) of what happened recently

Updated automatically by the loop runtime (a one-line breadcrumb after each loop run) and by /dmx/commit (light progress notes). /dmx/create-pr promotes what's left in the inbox before opening the PR. /dmx/update-memory reads the inbox, promotes durable items into systemPatterns.md, techContext.md, or productContext.md as appropriate, and clears what it promotes — it does not write to a separate history file.

In a monorepo with components, each item is tagged with its owner (- [ledger] … or - [repo-wide] …), a PR writes only the memory of the components it changed, and the rest waits in the job folder for its owner's next PR.

Updating the memory bank

The memory bank updates happen at two points:

Automatically: /dmx/commit appends light progress notes to activeContext.md after each phase, and promotes inbox items that are clearly durable (light sync); the loop runtime appends a one-line breadcrumb to activeContext.md's Session Notes at the end of every loop run. /dmx/create-pr (run by the Release Loop) promotes everything remaining in the inbox into the permanent files before opening the PR, and commits the result (full sync).

On demand: run /dmx/update-memory at any time for a deep sync: it reconciles contradictions across the memory files, rebuilds activeContext.md's structure, and commits its own changes:

/dmx/update-memory

Committing .dmx/ to the repo

The entire .dmx/ directory should be committed to your repository, with a few exceptions:

Commit:

  • config.md, projectbrief.md, productContext.md, systemPatterns.md, techContext.md
  • loops/ (custom loop configs), skills/ (custom skills), and components/ in a monorepo
  • shared-sources.yaml and shared-sources.lock, if you use shared sources. .dmx/.cache/ ignores itself.
  • jobs/: each ticket's spec.md, tasks.md, activeContext.md, and loop runs. /dmx/init adds .dmx/jobs/**/*.json linguist-generated=true to .gitattributes, so GitHub collapses loop state in PR diffs while the spec and plan stay visible.

Optionally gitignore:

  • The loop-run JSON in jobs/, if you don't want it in history. By default the loop runtime commits a run's final state when the run finishes, so the records travel with the PR, and the Release Loop's prune-jobs step removes finished jobs older than 30 days. A _pending-* folder under jobs/ is always safe to ignore — it's a temporary id the Spec Loop uses before a ticket is created, and it gets renamed away once one is.

To stop committing job records, add them to your .gitignore:

.dmx/jobs/**/*.json

If job records are already committed, you can untrack them by using:

git rm -r --cached '.dmx/jobs/**/*.json'

dmx keeps writing job state to disk, so you can still pause and resume loops on your machine. Teammates and reviewers just won't see the job history. Keep committing the ticket files: they're how a reviewer, and the next session, sees the spec.

Tips

Invest in systemPatterns.md. This is the file that most directly improves AI output quality. The more accurately it describes your codebase patterns, the less drift you'll see between the AI's output and your conventions.

Keep activeContext.md's inbox honest. It's meant to be transient — observations waiting to be promoted or discarded, not a permanent log. Run /dmx/update-memory regularly so it doesn't accumulate stale notes.

New developers benefit immediately. When a new developer joins and configures dmx, they get the full team's accumulated context from day one. This is one of the clearest benefits of committing the memory bank.

On this page