Define your own requirement schema with a custom reqmd init preset.

What’s in this folder#

04-custom-templates/
  preset/                   # the custom preset directory
    schema.yaml.tmpl        # Go template for schema.yaml
    example.md.tmpl         # Go template for the example .md file

This preset defines a custom requirements template with:

  • priority (required) — low, medium, high, critical
  • verification-method (required) — test, review, analysis, inspection, demonstration
  • owner (optional) — responsible team

Scaffold from the custom preset#

reqmd init my-safety/ --preset 04-custom-templates/preset/ --id-prefix SC

This produces:

my-safety/
  schema.yaml        # rendered from schema.yaml.tmpl
  requirements.md   # rendered from example.md.tmpl

Validate the scaffolded output#

reqmd check my-safety/

Expected: two requirements (SC-001, SC-002) pass validation.

Template variables#

Both .tmpl files use Go text/template syntax with:

VariableSourceExample
{{ .ID }}--id flag or dir basenamemy-safety
{{ .Title }}--title flag or <dir> Requirementsmy-safety Requirements
{{ .Level }}--level flag (default requirements)requirements
{{ .IDPrefix }}--id-prefix flagSC

Create your own preset#

  1. Create a directory with schema.yaml.tmpl + example.md.tmpl (or plain schema.yaml + any .md file — no template syntax needed)
  2. Use {{ .ID }}, {{ .Title }}, {{ .Level }}, {{ .IDPrefix }} variables
  3. Scaffold with reqmd init <dir> --preset <your-preset-dir>/

What’s next#

You can scaffold custom document types. Now load verification results — go to Step 5 for CTRF automated results or Step 6 for manual review results.