From mddesign
Three-tier memory layer for the orchestrator. Routes scratch (file-tier), WHERE (QMD), and WHY (MemPalace) through the existing code-memory-router slash command. Never edits planning files directly. Every WHY-tier promotion goes through the HITL gate.
npx claudepluginhub othmanadi/mddesign --plugin mddesignThis skill is limited to using the following tools:
Three-tier wrapper on top of `code-memory-router` plus a local file-tier scratchpad.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Three-tier wrapper on top of code-memory-router plus a local file-tier scratchpad.
| Tier | Purpose | Backend | Lifetime |
|---|---|---|---|
| scratch | Volatile session notes, in-flight findings | .agents/memory/scratch/<topic>.md (file-tier) | Session, until promoted or /mddesign:handoff promote |
| WHERE | Locational queries (where is X, which file, which directory) | QMD via /memory-router | Project lifetime |
| WHY | Decisions, rationale, post-mortems, "we picked X because" | MemPalace drawers via /memory-router | Forever |
/mddesign:memory save <text> (default tier: scratch)task_plan.md is the default topic. If no plan exists, use general.<text> plus an ISO timestamp to .agents/memory/scratch/<topic>.md. Create parent directories if needed./mddesign:memory save --tier why <text>/memory-router invocation (named checkpoint: before_mempalace_write)./memory-router with the canonical "save to MemPalace" pattern documented in code-memory-router's SKILL.md. Pass the text plus a project tag derived from CWD basename..agents/memory/scratch/<topic>.md: "PROMOTED to MemPalace at ." The original scratch entry stays in place for the rest of the session for context continuity./mddesign:memory recall <query>Routing rule:
Routing target:
/memory-router and let the router dispatch to QMD./memory-router and let the router dispatch to MemPalace..agents/memory/scratch/**/*.md for the query.Always print the source tier next to each result so the user sees provenance.
On Stop, the memory-keeper subagent runs and proposes promotions. This skill is the executor: when memory-keeper returns a list of WHY candidates, this skill drives /mddesign:memory save --tier why for each (each one HITL gated). Anything not promoted stays in scratch and is available for next session if session-handoff is configured.
task_plan.md, findings.md, or progress.md directly. Memory is a separate file space.code-memory-router. If you cannot reach it, fail loudly and tell the user to install code-memory-router..agents/memory/scratch/. Never put memory in task_plan.md or findings.md.code-memory-router skill (the user's, required) — routes WHERE to QMD and WHY to MemPalacememory_20250818) is reserved for v0.2 once it is exposed via MCP for cross-IDE use. v0.1.0 ships file-tier scratch as the substitute that works today on every coding agent.User runs /mddesign:memory save Decided to use Postgres over SQLite for the memory store, scaling concern.
This skill:
task_plan.md to find the active phase id (e.g., phase-2-data-model)..agents/memory/scratch/phase-2-data-model.md:
## 2026-04-23T10:30:00Z
Decided to use Postgres over SQLite for the memory store, scaling concern.
Later in the session the user says /mddesign:memory recall why postgres. This skill:
/memory-router to query MemPalace..agents/memory/scratch/**/*.md.[source: scratch] next to it.On Stop, memory-keeper flags this entry as a WHY candidate. The user approves. This skill promotes via /memory-router. Next session, /mddesign:memory recall why postgres returns from MemPalace with [source: WHY].