agentleFS
TheDecipheristTheDecipherist/claude-code-mastery-project-starter-kit/.claude/skills/mdd-workflow/SKILL.md

mdd-workflow

Skill337 starsChanged 5 months agoMITView on GitHub

Use in any project that uses MDD (a `.mdd/` directory exists) when editing source code, building a feature, fixing a bug, requesting an audit, or editing `.mdd/docs` files. Keeps feature docs in sync the moment their controlled source files change, recommends the `/mdd` workflow for substantial tasks, and conforms to `.mdd` doc conventions. Installed globally, so it self-gates: it does nothing in projects that don't use MDD.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If none exist, stop silently.

    line 22
  2. Very specific:

    Never run the workflow yourself: No branching, no .mdd/ bootstrap, no phase execution.

    line 25
  3. Distinctive:

    Silence is the default: When you activate but there is nothing controlled to sync and nothing substantial to recommend, produce no MDD …

    line 26
  4. Distinctive:

    When you are about to edit (or have just edited) a source file in an MDD project:

    line 32
  5. Distinctive:

    No match → the file is not controlled.

    line 38
  6. Very specific:

    Read .mdd/docs/00-frontmatter-spec.md first so any frontmatter edit conforms to the schema.

    line 41
  7. Distinctive:

    When the user asks for work MDD is built for and it would genuinely benefit, offer the matching mode once, then defer to the user.

    line 55
  8. Very specific:

    One offer per task: If the user declines or says "just do it," proceed ad-hoc and don't ask again this task.

    line 67
  9. Very specific:

    When editing a .mdd/docs/*.md file directly (not through /mdd), read .mdd/docs/00-frontmatter-spec.md first and conform:

    line 71
  10. Distinctive:

    All required frontmatter fields present and correctly typed.

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MDD Workflow Companion

This skill complements the /mdd command. The command owns the workflow; this skill keeps things honest between command runs. Its single most valuable job is preventing documentation drift the moment it would happen, before it accumulates.

Step 1 — Gate (do this first, every time)

Act only if this project uses MDD. Check for any of:

  • a .mdd/ directory in the project root, or
  • a resolvable /mdd command (.claude/mdd/, ~/.claude/mdd/, .claude/commands/mdd.md).

If none exist, stop silently. Do nothing, say nothing, never mention MDD. This skill is installed globally and will activate in projects that have never adopted MDD; in those projects it must be invisible.

Two hard rules that hold for everything below:

  • Never run the workflow yourself. No branching, no .mdd/ bootstrap, no phase execution. You recommend /mdd and let the user confirm. The command performs all side effects.
  • Silence is the default. When you activate but there is nothing controlled to sync and nothing substantial to recommend, produce no MDD output at all. Never narrate the gate or the check.

Step 2 — Job 1: Prevent doc drift when editing controlled code (priority)

Feature docs declare the source they own in frontmatter (source_files, plus routes and models). When that source is edited outside a /mdd run, the doc silently goes stale. Catch it at the edit, not weeks later in /mdd scan.

When you are about to edit (or have just edited) a source file in an MDD project:

  1. Cheap controlled-file check. Grep .mdd/docs/*.md for the file's path in source_files (and routes/models if the change adds or alters a route or model):
    grep -rl "<relative/path/to/file>" .mdd/docs/*.md
    No match → the file is not controlled. Stay silent and proceed normally.
  2. If a doc controls the file, name it and keep it in sync:
    • Read .mdd/docs/00-frontmatter-spec.md first so any frontmatter edit conforms to the schema.
    • Make the lightweight, factual updates inline: bump last_synced to today; add a new endpoint to routes; add a new model to models; append a genuinely new defect to known_issues (append-only — never remove entries).
    • Tell the user in one line: 📝 Edited <file>, controlled by .mdd/docs/<id>.md — synced last_synced and routes.
    • If the change is structural (behavior, business rules, contracts, or data flow changed, not just a field), don't try to re-derive the doc body yourself. Recommend the command that does a full resync: This change affects how <id> behaves. Run \/mdd update <id>` (or `/mdd audit`) for a full doc resync.`
  3. If the user is mid-flow and declines the sync, don't block their work. Note it once so it isn't lost: Leaving .mdd/docs/<id>.md unsynced — \/mdd scan` will flag it later.`

This is real-time and pre-commit, which is precisely what /mdd status and /mdd scan cannot do (they detect drift retrospectively, from git history, only when invoked). Defer batch and historical drift detection to those commands; this skill catches the single edit as it lands.

Step 3 — Job 2: Recommend the workflow for substantial tasks (recommend, never run)

When the user asks for work MDD is built for and it would genuinely benefit, offer the matching mode once, then defer to the user.

Nudge when the task is a new feature, a real (non-trivial) bug, a meaningful refactor, or an audit — and especially when it will touch code controlled by an existing feature doc that would drift if done ad-hoc.

Do not nudge for typos, formatting, renames, config tweaks, one-liners, or plain questions. Anything too small to deserve a doc is too small to nudge.

The offer is one line, in the user's words, and waits:

You have MDD installed and this looks like a task that would benefit from it — /mdd <feature> documents it first, then builds against the doc. Want me to use it, or just proceed here?

Pick the right invocation: feature → /mdd <feature-slug>; bug → /mdd bug; audit → /mdd audit; existing-doc drift → /mdd update <id>.

One offer per task. If the user declines or says "just do it," proceed ad-hoc and don't ask again this task. Never run /mdd without an explicit yes — but Job 1 still applies, so keep any controlled doc in sync even while working ad-hoc.

Step 4 — Job 3: Keep .mdd/docs conventions correct

When editing a .mdd/docs/*.md file directly (not through /mdd), read .mdd/docs/00-frontmatter-spec.md first and conform:

  • All required frontmatter fields present and correctly typed.
  • satisfies_contracts entries use the from / function / when / status (pending|done) / verified_at shape — the field is verified_at, not verified.
  • relates is symmetric: if doc A relates B, ensure B relates A.
  • known_issues is append-only.
  • Tags are domain concepts, technology names, or feature names — never file paths or generic words.

What this skill does NOT do

  • It does not execute, branch, bootstrap, or run any MDD phase — /mdd does that.
  • It does not re-derive doc bodies or do full resyncs — /mdd update, /mdd audit, and /mdd scan do that.
  • It does not act, or mention MDD, in projects that don't use MDD.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.