If you build LLM agents, you probably write the same prompt more than once. A Markdown config for one tool, a rules file for another, and then the actual [{role, content}] messages your SDK sends. The instructions are the same. The formats aren't, so you copy, tweak, and watch them drift.

I know I'm not the only one, because people build whole codegen pipelines to deal with it. One popular repo, wshobson/agents, generates its agent configs for six platforms (Claude Code, Codex, Cursor, OpenCode, Gemini, Copilot) from a single Markdown source of truth, using a Makefile. That is a lot of hand-rolled machinery for "write it once, emit it everywhere." I wanted that without owning a build script, so I wrote a small compiler.

What MDS is

MDS (Markdown Script) is a template language for composable prompt engineering. You write Markdown with imports, variables, functions and conditionals, and it compiles ahead of time to clean Markdown, or to a JSON chat-message array. There is no runtime. The compiled output is exactly what your tool or SDK reads, so nothing new runs inside your agent loop.

Composing a prompt from parts