v0.1.0 · Apache-2.0 · Claude Code Plugin

The glue your
agent stack
was missing.

MDDesign composes planning-with-files, Google's DESIGN.md, memory routing, agent-team dispatch, and session handoff into one plugin. Your agent sees the right design tokens at the right moment. Sessions survive /clear. Decisions persist forever. Five IDEs. One install.

Install now View on GitHub →
10 Commands
5 IDEs
20/20 Smoke probes
0 Replacements
All probes passing on Windows bash

The full surface area

10 commands.
Everything exposed.

Every command you need. Nothing you don't. Start with /mddesign:setup — it installs your missing dependencies so you don't have to guess.

mddesign commands — claude code
# Command What it does Category
01 /mddesign:setup Detect missing deps. Print exact install steps per platform. Idempotent. Start
02 /mddesign:doctor Six-probe diagnostic. Hooks firing? Lint reachable? Scratch writable? Fix-it for every failure. Start
03 /mddesign:compose Wiring check at project start. Prints a status table: planning / design / memory / scratch. Start
04 /mddesign:harvest Scan your codebase for de-facto tokens. Write a lint-valid DESIGN.md at project root. Design
05 /mddesign:critique Five-pass audit: structural / drift / a11y / completeness / consistency. Each finding gets a fix command. Design
06 /mddesign:fix <id> Apply one finding from the critique. HITL gated. Re-lints after every edit. Reverts if lint regresses. Design
07 /mddesign:inject Force-inject DESIGN.md tokens into findings.md. Use before a UI task the hook didn't auto-detect. Design
08 /mddesign:handoff Catchup (read-only) or promote (HITL). Survives /clear, reboots, and IDE switches. Memory
09 /mddesign:memory Three-tier: scratch (fast, session) / WHERE (QMD) / WHY (MemPalace, HITL gated). Routes by query prefix. Memory
10 /mddesign:team Dispatch a phase to a subagent via PhaseSpec v1. HITL before dispatch. Result logged to progress.md. Teams

The actual problem it solves

Before.
After.

Without MDDesign, your agent invents colors. With it, every UI prompt sees the token slice from DESIGN.md injected into findings.md before any code is written.

Without MDDesign
// Agent invents colors from training data
- backgroundColor: '#4338ca'
- color: '#fff'
- borderRadius: '6px'
- padding: '8px 16px'
- fontFamily: 'Inter, sans-serif'
- fontSize: '16px'
- fontWeight: 600

// 14 files later: #4338ca, #4F46E5, #6366f1
// three different "primary" blues.   drift.

The agent has no system context. Every session resets. Every component diverges silently.

With MDDesign
// findings.md ## Design Context (auto-injected)
// colors.primary     = #4F46E5
// colors.primary-700 = #3730A3  (hover)
// rounded.md         = 6px
// typography.button  = Inter 16/600

+ backgroundColor: tokens.colors.primary
+ color: tokens.colors['text-on-primary']
+ borderRadius: tokens.rounded.md
+ padding: `${tokens.spacing.sm} ${tokens.spacing.md}`
+ font: tokens.typography.button

design-bridge injects the relevant token slice on every UI phase. The agent references declared tokens. Critique catches drift before it ships.


Architecture

How the
pieces connect.

One orchestrator. Five arms. No replacements. Every tool does what it was built for; MDDesign is the missing layer between them.

YOUR CODEBASE src/**/*.tsx · tailwind.config · theme.ts
/mddesign:harvest (design-archeologist subagent scans + names tokens)
DESIGN.md Google Labs spec · lint-validated · yours in 60 seconds
│ │
/mddesign:critique │ every UI phase
▼ ▼
DESIGN.md.critique.md findings.md ## Design Context
F1 P0 structural auto-injected by design-bridge
F2 P1 drift / hex leak agent reads tokens on every turn
F3 P2 missing focus-ring │
/mddesign:fix F2 ──────────────────────────────────┘
team-dispatch ◄──────────────┘
│ PhaseSpec v1
planner · executor · reviewer · memory-keeper · design-archeologist
memory-layer scratch → WHERE (QMD) → WHY (MemPalace)
session-handoff Stop stamps handoff · SessionStart reads it back
survives /clear · reboots · IDE switches

Get running in 3 steps

Install.

The plugin installs in two commands. /mddesign:setup handles the rest — it detects every missing dependency and gives you the exact install command for your platform.

01
Add the marketplace
/plugin marketplace add OthmanAdi/MDDesign
02
Install the plugin
/plugin install mddesign@mddesign
03
Run setup
Checks Node, npx, planning-with-files, code-memory-router, MemPalace, QMD. Prints exact install steps for whatever is missing. Safe to run repeatedly.
/mddesign:setup
bash tests/smoke.sh → 20 passed / 0 failed · Windows Git Bash verified

What it needs

Dependencies.
Fully explicit.

Two required, four optional. /mddesign:setup installs them interactively. /mddesign:doctor verifies they work.

N
Node + npx
Runs @google/design.md lint on every harvest and critique. v18+.
required
P
planning-with-files
Owns task_plan.md / findings.md / progress.md. MDDesign reads these; never overwrites them.
required
C
code-memory-router
Routes WHERE → QMD, WHY → MemPalace. Without it, memory falls back to scratch-only.
optional
M
MemPalace MCP
Persistent WHY-tier. Decisions survive indefinitely. HITL-gated on every write. Python + venv.
optional
Q
QMD MCP
WHERE-tier. Search "where is the auth middleware" and get a precise answer. npm package.
optional
G
@google/design.md
Google Labs structural linter. Fetched via npx on demand — no global install required. v0.1.1.
optional
Claude Code
canonical
Cursor
.cursor/ mirror
Codex CLI
.codex/ mirror
Windsurf
.windsurf/ mirror
Cline
.clinerules/ mirror
OpenCode
.opencode/ mirror

Common questions

FAQ.

No. MDDesign never writes to task_plan.md. It only appends to findings.md under ## Design Context and to progress.md under ### Phase Result and ### Handoff stamps. Memory routing goes through code-memory-router — never bypassed, never replaced. These are load-bearing rules in AGENTS.md.
Yes. Every hook ships as both .ps1 (PowerShell) and .sh (bash). The hooks.json tries PowerShell first and falls back to bash. tests/smoke.ps1 and tests/smoke.sh both run 20 probes on Windows. Git Bash on Windows is required for the bash fallback.
Run /mddesign:harvest. The design-archeologist subagent scans your existing code (colors, typography, spacing, border-radius, component patterns), clusters the most-used values, names them by role (not value), and produces a structurally valid DESIGN.md that passes Google's linter. Most repos get a usable DESIGN.md in under 60 seconds.
Human-in-the-loop. Before MDDesign writes to DESIGN.md, dispatches a subagent, or promotes a decision to MemPalace's WHY tier, it prints a checkpoint banner and waits for your approval. Nothing irreversible happens without an explicit "yes." In v0.1.0 this is informational; blocking mode lands in v0.2.
The Stop hook stamps a ### Handoff <timestamp> entry in progress.md with the active phase, promoted decisions, and a resume hint. The SessionStart hook reads this stamp plus the most recent MemPalace WHY entries and synthesizes a one-paragraph preamble. The agent re-enters with full context on the first turn.
The dispatch contract between parent and child agents. It specifies: phase_id, goal, done_when (testable criteria), inputs.files, tools_allowed, tools_denied, budget (max tool calls + wall time), hitl_checkpoints, and a return_contract enforcing structured output. Without testable done_when, subagent completion is hallucinatable. PhaseSpec fixes that.