Skip to content

Get Started with mif-docs

By the end of this tutorial you will have installed the mif-docs plugin, authored your first MIF document, and watched the plugin’s own validator accept it and its fail-closed guard let it through. No prior MIF knowledge is assumed — you learn by doing, and you finish with one document that demonstrably passes.

  • Claude Code installed, with the claude command on your PATH.
  • Node.js 20+ installed (node --version prints a version) — the validator runs on Node.

Step 1 — Install the plugin from the org marketplace

Section titled “Step 1 — Install the plugin from the org marketplace”

Add the marketplace, then install the plugin:

Terminal window
claude plugin marketplace add modeled-information-format/claude-code-plugins
claude plugin install mif-docs@modeled-information-format

You now have mif-docs v0.3.0 available, which ships 37 genre skills, three substrate skills, and the doc-set-planner. The install also registers the PostToolUse guard you will meet in Step 4.

Create a file my-first-howto.md with this content. It is a tiny, real how-to — a genre document with the MIF frontmatter floor on top:

---
id: how-to-clear-the-cache
type: procedural
created: 2026-06-30T10:00:00Z
---
# How to Clear the Build Cache
Remove stale build artifacts so the next build starts clean.
## Step 1 — Delete the cache directory
Run `rm -rf ./.cache` from the project root. The directory is recreated on the
next build.

The three frontmatter fields — id, type, and created — are the MIF Level 1 floor. type: procedural is the conceptType every how-to and tutorial carries.

Step 3 — Validate it and watch mif-validate pass

Section titled “Step 3 — Validate it and watch mif-validate pass”

Run the plugin’s deterministic validator against your file:

Terminal window
node scripts/mif-validate.mjs my-first-howto.md --level 1

You should see a final line reading RESULT: VALID at MIF L1, noting that the document is schema-conformant and its round-trip is lossless. There is no language model in that verdict — it is the canonical schema plus a lossless markdown↔JSON-LD round-trip. Identical input yields an identical answer every time.

The plugin registers a PostToolUse hook that re-validates any genre document the moment it is written or edited. A document that fails mif-validate --level 1 makes the guard exit 2 and blocks the write. Because the document you just authored is conformant, the guard lets it through silently — no error, the file is saved. That silence is the success signal: the gate ran and accepted your work.

You installed mif-docs, authored a conformant MIF how-to, saw the deterministic validator pass it, and confirmed the fail-closed guard accepts it. To turn this into a repeatable workflow — validating any document and converting it to JSON-LD — follow the how-to guide. To look up every genre, recipe, and script, consult the catalog reference. To understand why each document is both a human artifact and a machine unit, read the explanation. All three are recorded as typed relates-to edges in this tutorial’s relationships[].