This repository holds the Leiden University DMP template (v4.3) as Markdown with a .json backend. Below: how to write the DMP, build it, and version-control it. AI coding agents help but are not required.
Researchers with the programmatic skillset and whose work is inherently data-driven and programmatic, and for whom managing a DMP in Word is suboptimal or impractical. With this version of the Leiden DMP template, updates are text edits in a single .md file that gets exported as a .json backend, version-controlled with Git, and all fields have ID, type, and validation. See the vignette.
Requires Pandoc, weasyprint, and the fonts Calibri and Menlo (or falls back to system fonts, but the font will differ from the Word template).
Copy the blank template: cp src/dmp-template.md vignettes/my-project/dmp.md
Fill in your project details. See vignettes/veni/dmp-veni.md for a worked example.
Generate the JSON: make json DMP=vignettes/my-project/dmp.md
Build: make html or make pdf. The output is visually identical to the official Word template.
.md, run make json to derive the .json, and make html or make pdf for output. make validate checks for drift between the two files. make freeze produces dated PDFs for the institutional J-drive.The clearest non-AI use case: analysis scripts can write their outputs directly into the DMP. A script that tallies file sizes for the data-size table (field 1.6), generates a file manifest listing every dataset and its storage location, lists where code and scripts live across environments (field 1.5), logs software versions and dependencies from sessionInfo() or pip freeze, or traces which results came from which scripts as an audit trail can update the relevant fields in the .md as part of its own pipeline. The DMP also defines file naming schemes (field 3.1) that scripts can read and enforce. With Word, those numbers are hand-copied and stale the moment the data changes; here, they flow from the analysis to the document automatically.
The reverse also works: because the DMP is machine-readable, project scripts can pull from it to enforce what it declares — validating that files are stored where the DMP says they are, checking that only declared file formats appear in the output, or flagging when a backup location is unreachable.
And because the DMP is plain text with structured fields, anyone can search it, grep it, or ask a coding agent questions about it — essential when managing several projects at once or supervising others whose data handling you are responsible for.
Once the template is copied, the programmatic DMP lives in your own git repository. Edit the .md, run make json to regenerate the .json, then make html to preview, then git commit. The .json is derived from the Markdown; you never hand-edit it. make validate confirms nothing drifted between the two files. Commit after each meaningful change: git log is your version history, git diff shows exactly what changed.
At each status transition (draft → review, review → approved, active → frozen): run make freeze, tag the commit (git tag fr-YYYY-MM-DD), and copy the frozen PDF to the J-drive.
Leiden University policy defines a DMP at the project level, so one DMP can cover several papers (see the Leiden University Research Data Management Regulations [definitions] and the Leiden Law School Research Data Protocol [PDF]). A project-level DMP evolves across the project period, from an initial draft for data-steward review to a final frozen version archived for the minimum 10-year retention period. Individual papers do not get separate DMPs; instead, each paper gets an archival-mode DMP when published, recording what was actually deposited and where, while omitting details that are only relevant for active, ongoing projects.
For Leiden Law School and the Department of Economics: frozen PDFs go to the faculty data management coordinator and the J-drive at status transitions and project closure.
The template works without any AI tooling; it is plain Markdown and make. That said, a coding agent (Claude Code, Copilot, or similar) can accelerate the tedious parts. Most of the information a DMP asks for already exists somewhere: the grant application, the ethics registration, the data access agreement. An agent can read the schema, prompt the user for each field, and handle the insertion and filling, or pull answers from those documents and draft a filled DMP with no manual re-entry. Tasks where agents save the most time:
make json regenerates the .json from the Markdown automatically. No agent needed, but agents help when things break.field-mapping.yaml and rewrites fields mechanically.Your responsibility. You choose which agent to use, in which jurisdiction it operates, and how it handles personal data or secrets. Ensure compliance with the AVG/GDPR and any data access agreements before passing project documents to an external service. Since the work is mostly simple JSON and coding, most GDPR-compliant models should be suitable. Note that SURF currently considers Microsoft Copilot not GDPR-compliant for research data, even though Leiden ICT has it enabled in Office 365; check your institution's guidance before using it on DMP content.
| Command | What it produces |
|---|---|
| make html | DMP as HTML with per-section copy buttons |
| make pdf | DMP as PDF (weasyprint) |
| make json DMP=… | Derives .json from a single .md (the human-editable workflow) |
| make json-all | Regenerates JSON for all vignette DMPs |
| make validate | Checks every .md ↔ .json pair; exits non-zero on drift |
| make freeze | Dated frozen PDF for archival (runs validate first) |
| make template | Blank template in md, html, pdf, txt |
| make resolve DMP=… | Merges a subproject DMP delta with its parent |
| make schema-json | Regenerates dmp-schema.json from YAML (needs Ruby) |
| make clean | Removes all generated files |
.yaml + generated .json), CSS, header blocks, tooling scripts (extract-json.py, dmplib.py, validate-drift.py, resolve.py), version-migration files, Leiden logosmake json)JSON companion format. Every filled DMP has a .json file derived from the Markdown: flat keys from the schema, one row per DMP, loadable as a data frame. A data steward managing 50 projects can query across them. See src/dmp-instance-spec.md.
The template and tooling will be available at github.com/rkarlssonlinner/data-mgmt.