How to Use This Repo

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.

Who is this for?

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.

Quick start

Requires Pandoc, weasyprint, and the fonts Calibri and Menlo (or falls back to system fonts, but the font will differ from the Word template).

1

Copy the blank template: cp src/dmp-template.md vignettes/my-project/dmp.md

2

Fill in your project details. See vignettes/veni/dmp-veni.md for a worked example.

3

Generate the JSON: make json DMP=vignettes/my-project/dmp.md

4

Build: make html or make pdf. The output is visually identical to the official Word template.

Architecture

HUMAN-READABLE MACHINE-READABLE dmp-template.md blank planning template dmp-schema.yaml field types + validation rules copy + fill defines fields project-dmp.md filled DMP (source of truth) project-dmp.json derived companion make json make validate (drift check) pandoc + css HTML / PDF make html · make pdf make freeze Frozen PDF fr-YYYY-MM-DD J-drive institutional archive archive copy Paper published → same pipeline from dmp-template-archival.md
The build pipeline. Edit the .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.

Pipeline integration

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.

Git workflow

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.

Lifecycle — from draft to archive

Draft→ Under review→ Approved→ Active→ Frozen fr-YYYY-MM-DD

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.

Where a coding agent helps

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:

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.

Build targets

CommandWhat it produces
make htmlDMP as HTML with per-section copy buttons
make pdfDMP as PDF (weasyprint)
make json DMP=…Derives .json from a single .md (the human-editable workflow)
make json-allRegenerates JSON for all vignette DMPs
make validateChecks every .md ↔ .json pair; exits non-zero on drift
make freezeDated frozen PDF for archival (runs validate first)
make templateBlank template in md, html, pdf, txt
make resolve DMP=…Merges a subproject DMP delta with its parent
make schema-jsonRegenerates dmp-schema.json from YAML (needs Ruby)
make cleanRemoves all generated files

Repository layout

src/
Templates (planning + archival), field schema (.yaml + generated .json), CSS, header blocks, tooling scripts (extract-json.py, dmplib.py, validate-drift.py, resolve.py), version-migration files, Leiden logos
vignettes/veni/
Worked example derived from a Veni project DMP that was extensively reviewed because of personal, health, and genetic data. Fictional details, real structure. Planning and archival DMPs, each as .md + .json (JSON derived via make json)
Makefile
Build automation (Pandoc + weasyprint + extraction)

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.