Setup
Three steps to get dx running in your project. Works with Claude Code, GitHub Copilot CLI, and VS Code Chat.
Install plugins, configure project, teach the AI your conventions.
Install Plugins
Add the shared marketplace and install the plugins your project needs.
# Add marketplace (one-time) /plugin marketplace add easingthemes/dx-aem-flow # Install plugins /plugin install dx-core@dx-aem-flow /plugin install dx-aem@dx-aem-flow # AEM projects only /plugin install dx-hub@dx-aem-flow # Multi-repo orchestration only
Prerequisite — your project should have a CLAUDE.md
These are plugins: they install into a project that is already set up. If yours has no
CLAUDE.md, run Claude Code’s own /init first — the plugins never
create or modify it.
Since Claude Code v2.1.277, a project with no CLAUDE.md
falls back to reading AGENTS.md instead. /dx-init generates
AGENTS.md as an agent inventory table, not project instructions — so
without CLAUDE.md, that table is what Claude Code loads as your project’s
instructions. With it present, the default mode ignores AGENTS.md and nothing
changes.
Updating Later
/plugin marketplace update dx-aem-flow updates all installed plugins to the latest version.
After upgrading, run /dx-upgrade to sync project files to the new plugin version.
Upgrading to v7: post-merge skills consolidated
v7 removes /aem-verify, /aem-editorial-guide, /aem-doc-gen,
/aem-qa-handoff and /dx-doc-retro, and the Copilot agents
@AEMAfter / @AEMEditorialGuide. Use /aem-demo-page
(—local while developing, QA after the merge), /dx-doc-gen (retro mode
when the story has no spec files), /dx-qa-handoff, and /dx-post-merge, which
runs demo page → wiki → QA handoff once the change is on QA. Full mapping:
Skill Catalog → Removed in v7.
What changes for you: /dx-agent-all ends at the PR; /aem-fe-verify needs
/aem-demo-page —local first; the DOCAgent pipeline posts nothing for an AEM story until
the change is on QA, so tag the work item after the QA deploy; aem-after.md and
demo/authoring-guide.md are no longer read.
After updating, run /dx-upgrade: it swaps the Copilot agents and lists every local
script, shadowed skill or copilot-instructions.md row that still names a removed
command. DOCAgent users: re-run /auto-init (keep config) to refresh the pipeline YAML.
To stay on v6, pin the marketplace source to ref: “v6.6.0”.
Upgrading: Basic Auth (BASIC_AUTH_SITES)
The old QA-only Basic Auth environment variables and the matching block under aem: in
.ai/config.yaml are no longer read (/dx-doctor lists any leftovers). Set BASIC_AUTH_SITES instead (format below and in the basic-auth rule):
name:url:user:pass entries joined by commas. Only pass may contain a colon,
written as %3A; user must not contain one.
Run /dx-upgrade after updating the plugins: it installs the .claude/rules/basic-auth.md rule
and refreshes .ai/lib/dx-common.sh (which adds curl-basic-auth). The browser side needs no
project file: the playwright MCP server loads its init page from the dx-core plugin. On Copilot CLI that
path comes from the exported CLAUDE_PLUGIN_ROOT.
Initialize & Configure
Create project config, install convention rules, detect project structure.
AEM Projects — Set Environment Variables First
The AEM MCP server requires the AEM_INSTANCES environment variable. Set it before running
/aem-init so component discovery can scan your running AEM instance for dialog fields,
variants, and pages.
# Format: name:host:user:pass — comma-separated for multiple instances export AEM_INSTANCES="local:http://localhost:4502:admin:admin" # Multi-instance example (local + QA): # export AEM_INSTANCES="local:http://localhost:4502:admin:admin,qa:https://qa-author.example.com:USER:PASS" # Optional: accessibility testing # export AXE_API_KEY="your-axe-api-key" # Optional: HTTP Basic Auth for protected QA/Stage sites (single quotes keep $ and ! literal) # Format: name:url:user:pass — comma-separated; a port stays in the URL; a ':' in pass is written %3A # export BASIC_AUTH_SITES='qa:https://qa.example.com:user:pass,uat:https://uat.example.com:8443:user:pass'
Restart your terminal or run source ~/.zshrc after adding these.
These env vars work in both Claude Code and Copilot CLI.
Run these commands in order:
/dx-init
Core initialization — creates .ai/config.yaml, convention rules, MCP config, agent templates, shared scripts. Interactive — asks about your Azure DevOps or Jira project, build commands, and base branch.
If it detects an AEM project, automatically runs /aem-init to append the aem: section, install BE/FE rules by project role, and auto-generate component-index.md via AEM MCP.
/dx-adapt
Auto-detects project type (aem-fullstack, aem-frontend, etc.), toolchain (Node version, build tool, CSS compiler), and writes project.type, project.role, and toolchain: to config.
/dx-init # Core config + rules + MCP (chains to /aem-init for AEM projects) /aem-init # Only if not already run as part of /dx-init /dx-adapt # Project type + toolchain auto-detection
/aem-init
/dx-init automatically chains to /aem-init when it detects an AEM project.
Run /aem-init separately only if you skipped it during init or are adding AEM support to an existing project.
What gets created
| Path | Purpose | Created By |
|---|---|---|
.ai/config.yaml | Project config (branches, Azure DevOps/Jira, build commands, AEM) | dx-init + aem-init + dx-adapt |
.claude/rules/ | Convention rules (generic templates at this stage) | dx-init + aem-init |
.mcp.json | MCP server configuration (ADO, Jira/Confluence, Figma, axe) | dx-init |
.github/agents/ | Copilot agent templates | dx-init |
.ai/project/component-index.md | Component catalog (auto-discovered from AEM) | aem-init |
.ai/templates/ | Spec file and work item comment templates | dx-init |
.ai/rules/ | Shared rules (PR review, pragmatism) for local + automation | dx-init |
Scan Your Project
Teach the AI your actual conventions — replace generic placeholders with real values from your codebase.
After init, your .claude/rules/ files contain generic templates and .ai/project/ seed data is minimal.
/dx-scan reads your actual source code, discovers conventions interactively, and writes project-specific values.
/dx-scan
Phase 1: Frontend
Discovers CSS variables, breakpoints, naming conventions (BEM/utility), component registration patterns,
base classes, clientlib categories. Updates fe-styles.md, fe-javascript.md,
fe-components.md, fe-clientlibs.md.
Phase 2: Backend
Discovers Sling Model annotations, exporter patterns, dialog structure, HTL conventions,
test framework, package structure. Updates be-sling-models.md, be-components.md,
be-dialog.md, be-htl.md, be-testing.md.
Phase 3: Seed Data
Generates architecture.md, features.md, file-patterns.yaml,
and content-paths.yaml in .ai/project/. Skips component-index.md
if already created by /aem-init.
Interactive Process
/dx-scan presents each discovery with concrete examples from your code and asks for confirmation
before writing. You can correct, enrich, or skip any phase. This is a one-time step — run it once after
initial setup, then only again if your project structure changes significantly.
Before vs After /dx-scan
Before (generic rules)
fe-styles.md says: “Use project CSS variables for spacing and colors.” Agents don’t know
your actual variable names, breakpoints, or color tokens.
After (project-specific)
fe-styles.md says: “Use $bp-mobile: 768px, $bp-tablet: 1024px.
Colors: $color-primary: #1a1a1a. Naming: BEM.” Agents write code that matches your project.
MCP Configuration
/dx-init creates .mcp.json with all MCP servers pre-configured. You only need to verify ADO authentication.
MCP Servers — Already Configured
/dx-init creates .mcp.json with ADO, AEM, Figma, axe, and Playwright servers.
ADO MCP uses browser-based OAuth — on first use, it opens a browser to authenticate. No PAT needed.
For platform-specific details (permissions, settings scope, Copilot CLI differences), see:
Setup Complete
You're ready to go
Run /dx-doctor to verify everything is connected (MCP servers, config, rules).
Then start with /dx-req <ticket-id> to pull your first story.
/dx-doctor # Check health of all dx workflow files /dx-help "how does this project work?" # Test if AI understands your project