methodatlas
Method guideKnowledge Modeling

Shape-First Modeling

A practical method guide: clarify prerequisites and materials, understand the complete process, and look up outputs, pitfalls, and stop criteria.

ComplexityMedium
TimeHalber Tag pro Domain Slice
Participants1-4
FormatWorkshop + async
MaturityEstablished
Plan Shape-first Modeling
01

Prerequisite

What needs to be finished first

Complete firstBounded subject

The scope and purpose of Shape-first Modeling are stated as a concrete question.

Without scope, SHACL shape suite becomes arbitrary.
Complete firstAccess to relevant perspectives

RDF use cases, valid and invalid sample data, namespace and severity policy and domain decision makers are available.

Without these perspectives, central claims in SHACL shape suite remain unsupported.
02

Preparation

What needs to be ready before start

Materials

RDF use cases, valid and invalid sample data, namespace and severity policy, shared workspace, source links, and decision log.

People / roles

Domain expert · RDF engineer · data producer · consumer

Pre-read

Collect RDF use cases, valid and invalid sample data, namespace and severity policy in advance and mark open assumptions.

Time needed

60–120 minutes per shape module

Setup

Prepare targets, NodeShapes, PropertyShapes, and constraint components before broad ontology modelling visibly and calibrate assessment terms before starting.

03

Core question

The one question this method answers

Which RDF structure must hold for the use case, and how is each violation reported?

04

Flow

Phases with goal, actions, output and pitfall

SHACL separates the shapes graph from the data graph. NodeShapes select targets; PropertyShapes define path, cardinality, datatype, class, and other constraints. Validation produces a results graph.

SHACL shape suite

Fictional worked example

targets, NodeShapes, PropertyShapes, and constraint components before broad ontology modelling as a precise working structure with a fictional example.

Target

NodeShape · targetClass/node

ActionShape targetClass Action.

Property shape

Path · min/maxCount · datatype/class

owner min=1 max=1; dueDate xsd:date.

Fixture

Positive · negative · boundary

Action without owner as negative case.

Result

focusNode · resultPath · severity · message

A-17, owner, Violation, owner missing.

The example demonstrates the domain logic of Shape-first Modeling; worksheets remain blank.

W3C Shapes Constraint Language (SHACL)

  1. 1

    Define contract

    Define contract

    Goal

    Produce constraint backlog so the core question “Which RDF structure must hold for the use case, and how is each violation reported?” can be answered with stronger support.

    Inputs for this step

    • RDF use cases
    • valid and invalid sample data
    • namespace and severity policy

    Actions

    • Define use case, target, must/should rules, and severity.
    • Record source, rationale, and open uncertainty directly in constraint backlog.

    Output

    constraint backlog

    constraint backlog · source · uncertainty · next decision

    Quality check

    Is every rule justified by the domain?

    Pitfall

    Shapes copy accidental patterns from sample data instead of justified domain constraints. Document use case and constraint rationale, write positive and negative cases, and set severity deliberately.

    Timing: 10–20 minutes

  2. 2

    Author shapes

    Author shapes

    Goal

    Produce shapes graph so the core question “Which RDF structure must hold for the use case, and how is each violation reported?” can be answered with stronger support.

    Inputs for this step

    • constraint backlog
    • valid and invalid sample data
    • namespace and severity policy

    Actions

    • Write NodeShapes and PropertyShapes with Core components.
    • Record source, rationale, and open uncertainty directly in shapes graph.

    Output

    shapes graph

    shapes graph · source · uncertainty · next decision

    Quality check

    Are paths, counts, datatypes, and classes correct?

    Pitfall

    Shapes copy accidental patterns from sample data instead of justified domain constraints. Document use case and constraint rationale, write positive and negative cases, and set severity deliberately.

    Timing: 10–20 minutes

  3. 3

    Build fixtures

    Build fixtures

    Goal

    Produce RDF fixtures so the core question “Which RDF structure must hold for the use case, and how is each violation reported?” can be answered with stronger support.

    Inputs for this step

    • shapes graph
    • valid and invalid sample data
    • namespace and severity policy

    Actions

    • Create valid, invalid, and boundary data.
    • Record source, rationale, and open uncertainty directly in RDF fixtures.

    Output

    RDF fixtures

    RDF fixtures · source · uncertainty · next decision

    Quality check

    Does each negative case violate the intended rule?

    Pitfall

    Shapes copy accidental patterns from sample data instead of justified domain constraints. Document use case and constraint rationale, write positive and negative cases, and set severity deliberately.

    Timing: 10–20 minutes

  4. 4

    Validate

    Validate

    Goal

    Produce validation suite so the core question “Which RDF structure must hold for the use case, and how is each violation reported?” can be answered with stronger support.

    Inputs for this step

    • RDF fixtures
    • valid and invalid sample data
    • namespace and severity policy

    Actions

    • Run a SHACL processor and inspect the results graph.
    • Record source, rationale, and open uncertainty directly in validation suite.

    Output

    validation suite

    validation suite · source · uncertainty · next decision

    Quality check

    Does every result include focus node, path, and constraint?

    Pitfall

    Shapes copy accidental patterns from sample data instead of justified domain constraints. Document use case and constraint rationale, write positive and negative cases, and set severity deliberately.

    Timing: 10–20 minutes

05

Artifact

What comes out at the end

Sketch: what the artifact looks like

Shape-First Modeling · Datenqualität zuerst modellierenKlassen, Pflichtfelder, Datentypen, Beziehungen und Kardinalitäten als ausführbare Shapes definieren und gegen Beispieldaten validieren
Shape-First ModelingDas Visual zeigt Knotenklassen, einen Shape Contract mit Pflichtfeldern, Optionalität, Datentypen und Kardinalitäten sowie Validierung gegen Beispieldaten.Datenverträge vor freier Ontology-Semantik festlegenShape-First Modeling macht Erwartungen an Graphdaten ausführbar, prüfbar und versionierbar.Knotenklassenwichtigste Domain-Slices zuerstShape Contractrequiredname, idoptionaldescriptiondatatypexsd:datecardinality1..n relationsBeispieldatenInstanzen gegen Shapes prüfenValidation ReportFehler, Warnungen undDatenvertragConstraints voroffener SemantikausführbareDokumentationQuality Gate
Form

Versioned SHACL shape suite with date, sources, owners, and next review.

Versioning / ownership

Retain date, source, assumption state, and decision for every version of SHACL shape suite.

Tool alternatives
  • SHACL shape suite as board or document
  • Source and evidence register
  • Decision and action log

shape-first-modeling-working-template.md

Plan Shape-first Modeling around its domain steps and the concrete decision question.

Shape-First Modeling: Worksheet

Question

To be confirmed

Desired outcome

To be confirmed

Scope

Full workshop Time: 60–120 minutes per shape module

Complete this worksheet on paper or in your own document during the work.

Preparation for this scope

Method setup

  • Materials: RDF use cases, valid and invalid sample data, namespace and severity policy, shared workspace, source links, and decision log.
  • Roles: Domain expert · RDF engineer · data producer · consumer
  • Advance information: Collect RDF use cases, valid and invalid sample data, namespace and severity policy in advance and mark open assumptions.
  • Overall time needed: 60–120 minutes per shape module
  • Setup: Prepare targets, NodeShapes, PropertyShapes, and constraint components before broad ontology modelling visibly and calibrate assessment terms before starting.

Prepare for the work steps

Define contract: Define contract

  • RDF use cases
  • valid and invalid sample data
  • namespace and severity policy

Author shapes: Author shapes

  • constraint backlog
  • valid and invalid sample data
  • namespace and severity policy

Build fixtures: Build fixtures

  • shapes graph
  • valid and invalid sample data
  • namespace and severity policy

Validate: Validate

  • RDF fixtures
  • valid and invalid sample data
  • namespace and severity policy

SHACL shape suite

Target

NodeShape · targetClass/node

...

Property shape

Path · min/maxCount · datatype/class

...

Fixture

Positive · negative · boundary

...

Result

focusNode · resultPath · severity · message

...

Enter only real input, sources, and decisions.

W3C Shapes Constraint Language (SHACL)

Define contract: Define contract

Expected artifact: constraint backlog

constraint backlog · source · uncertainty · next decision

Entry:

...

  • Is every rule justified by the domain?

Author shapes: Author shapes

Expected artifact: shapes graph

shapes graph · source · uncertainty · next decision

Entry:

...

  • Are paths, counts, datatypes, and classes correct?

Build fixtures: Build fixtures

Expected artifact: RDF fixtures

RDF fixtures · source · uncertainty · next decision

Entry:

...

  • Does each negative case violate the intended rule?

Validate: Validate

Expected artifact: validation suite

validation suite · source · uncertainty · next decision

Entry:

...

  • Does every result include focus node, path, and constraint?

Open questions and next steps

...

Method guide: https://methodatlas.meierhoff-systems.de/en/methods/shape-first-modeling/run-sheet

06

Example output

Concrete filled scenario, fictional example

Fictional example for orientation. Counts and timings describe this case and are not universal requirements.

shape-first-modeling-beispiel.md

Concrete filled scenario, fictional example

ex:ActionShape a sh:NodeShape; sh:targetClass ex:Action. Property shape for ex:owner with sh:minCount 1 and sh:maxCount 1; ex:dueDate with sh:datatype xsd:date. A negative case without owner produces a ValidationResult with focusNode, resultPath, sourceConstraintComponent, and message.

07

Pitfalls

Recognize symptoms and steer against them

Quick overview, the full text is in the matching phase in the flow

  1. Define contractShapes copy accidental patterns from sample data instead of justified domain constraints.View in phase
  2. Author shapesShapes copy accidental patterns from sample data instead of justified domain constraints.View in phase
  3. Build fixturesShapes copy accidental patterns from sample data instead of justified domain constraints.View in phase
  4. ValidateShapes copy accidental patterns from sample data instead of justified domain constraints.View in phase
08

Stop criteria

When to pause, resolve prerequisites, or choose another approach

SHACL shape suite answers the core question with traceable evidence or explicitly marked uncertainty.
Owners, next actions, and review dates are named for open points.

Method after W3C SHACL Community. Curated with 1 sources.

Sources: W3C Shapes Constraint Language (SHACL)

Flow, timeboxes, and pitfalls are editorially curated practice recommendations based on the listed sources.

Finished the method guide?

Go to the profile for purpose, similar methods, and sources or continue to the next method in the catalog.