Skip to content

Orchestrate a documentation set with the planner

Orchestrate a documentation set with the planner

Section titled “Orchestrate a documentation set with the planner”

By the end of this tutorial you will have used the doc-set-planner skill to turn one subject into a coordinated set of four linked documents, and proven the set is link-complete. You will not author each document by hand — you will watch the planner decompose the subject, fan out to the member genre skills, and reconcile the cross-document graph. No prior MIF knowledge is assumed beyond the getting-started tutorial.

  • The mif-docs plugin installed (see the getting-started tutorial).
  • Node.js (current LTS) on your PATH — the validators run on Node.
  • A subject to document. This lesson uses “the project’s rate limiter” as the running example; substitute your own.

Step 1 — Choose a recipe for your subject

Section titled “Step 1 — Choose a recipe for your subject”

The planner does not invent structure; it loads a declarative recipe that names the member documents and the links between them. Four recipes ship:

RecipeMembersUse it when the subject is…
diataxistutorial, how-to, reference, explanationa feature users must learn, use, look up, and understand
ai-specfeature-spec, ai-architecture-doca feature a coding agent will build from a spec
kirokiro-requirements, kiro-design, kiro-tasksa feature run through the AWS Kiro workflow
architecturearc42-arch-doc, c4-model-diagrama system whose structure must be communicated

For a user-facing feature like the rate limiter, the diataxis recipe is the right fit: users need to learn it, perform tasks with it, look up its limits, and understand why it exists.

Invoke the orchestrator on your subject and recipe:

/doc-set-planner the project's rate limiter --recipe diataxis

The planner runs its five-step engine: scope (load the diataxis recipe), plan (decompose the subject into the four member documents and a shared MIF namespace), fan-out (invoke diataxis-tutorial, diataxis-how-to, diataxis-reference, and diataxis-explanation, each on its slice), and reconcile (wire the cross-document relationships[] graph so each mode links its siblings), and validate (every member passes its own acceptance check and the set is proven link-complete, the subject of steps 4 and 5 below). It emits a plan first — read it before the members are written.

Step 3 — Inspect the reconciled relationship graph

Section titled “Step 3 — Inspect the reconciled relationship graph”

Each produced member carries typed relates-to edges to the others. Open any member and look at its frontmatter relationships[]: the tutorial points at the how-to, reference, and explanation; the reference points back; and so on. This is the planner’s reconciliation step made concrete — the set is a graph, not four unrelated files.

The planner’s final guarantee is link-completeness: every declared cross-relationships[] target resolves to a document the run actually produced — no dangling edges. Verify it:

Terminal window
node scripts/planner-check.mjs diataxis

A 0 exit with link-complete for the recipe means the graph closes. Run it with no argument to check every recipe under skills/doc-set-planner/recipes/.

Link-completeness checks the graph; mif-validate checks each document. Validate the members at their target levels (tutorial and how-to at L2, reference and explanation at L3):

Terminal window
node scripts/mif-validate.mjs rate-limiter-tutorial.md --level 2 # tutorial, how-to
node scripts/mif-validate.mjs rate-limiter-reference.md --level 3 # reference, explanation

Each should report VALID with a lossless round-trip. When the set is both link-complete and per-member valid, the orchestration is done.

You turned one subject into a coordinated, link-complete Diátaxis set without hand-assembling it: the planner scoped a recipe, decomposed the subject, fanned out to the four member skills, and reconciled the graph, and you proved the result with planner-check and mif-validate. To chain skills across channels rather than within one Diátaxis set, follow the compose-a-spec-set tutorial. For the full description of the orchestrator, see the doc-set-planner reference.