From 5baa894eac48c4434cd6f4d2f2efa2088a1fab33 Mon Sep 17 00:00:00 2001 From: Jesse Wright <63333554+jeswr@users.noreply.github.com> Date: Thu, 23 Apr 2026 02:29:21 +0100 Subject: [PATCH 1/2] Add Task/TODO shape (RFC 5545 iCalendar VTODO) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a SHACL shape for cal:Vtodo grounded in the W3C iCalendar in RDF vocabulary, mirroring the RFC 5545 §3.6.2 VTODO calendar component. Constrains summary, description, dtstart, due, status (NEEDS-ACTION / IN-PROCESS / COMPLETED / CANCELLED), priority (0-9), percentComplete (0-100), and categories. Co-Authored-By: Claude Opus 4.7 (1M context) --- shapes/task.ttl | 122 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 shapes/task.ttl diff --git a/shapes/task.ttl b/shapes/task.ttl new file mode 100644 index 0000000..78b4f1a --- /dev/null +++ b/shapes/task.ttl @@ -0,0 +1,122 @@ +@prefix cal: . +@prefix dc: . +@prefix dct: . +@prefix prov: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix vs: . +@prefix xsd: . + +@prefix task_shape: . + +task_shape:TaskShape + a sh:NodeShape ; + sh:targetClass cal:Vtodo ; + sh:name "Task Shape" ; + sh:description "SHACL shape for a TODO/task item, based on RFC 5545 iCalendar VTODO as exposed in the W3C iCalendar in RDF vocabulary." ; + dct:created "2026-04-23"^^xsd:date ; + vs:term_status "testing" ; + dc:source ; + prov:wasDerivedFrom ; + dct:references ; # references the cal:Vtodo class from the W3C iCalendar in RDF vocabulary, together with the cal:summary, cal:description, cal:dtstart, cal:due, cal:status, cal:priority, cal:percentComplete, and cal:categories properties used to model a task or TODO item. + dct:references ; # references RFC 5545 §3.6.2 (VTODO Calendar Component) which defines the iCalendar TODO component that the W3C iCalendar in RDF vocabulary mirrors. + sh:codeIdentifier "Task"; + + # Short title for the task. + sh:property [ + sh:path cal:summary ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:name "Title" ; + sh:description "Short summary or title of the task (RFC 5545 SUMMARY)." ; + sh:codeIdentifier "summary"; + ] ; + + # Longer description. + sh:property [ + sh:path cal:description ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:name "Description" ; + sh:description "Longer textual description of the task (RFC 5545 DESCRIPTION)." ; + sh:codeIdentifier "description"; + ] ; + + # Start date or date-time. + sh:property [ + sh:path cal:dtstart ; + sh:or ( + [ sh:datatype xsd:date ] + [ sh:datatype xsd:dateTime ] + ) ; + sh:maxCount 1 ; + sh:name "Start" ; + sh:description "Date or date-time at which work on the task begins (RFC 5545 DTSTART)." ; + sh:codeIdentifier "start"; + ] ; + + # Due date or date-time. + sh:property [ + sh:path cal:due ; + sh:or ( + [ sh:datatype xsd:date ] + [ sh:datatype xsd:dateTime ] + ) ; + sh:maxCount 1 ; + sh:name "Due" ; + sh:description "Date or date-time by which the task is due to be completed (RFC 5545 DUE)." ; + sh:codeIdentifier "due"; + ] ; + + # Status. RFC 5545 §3.8.1.11 defines the VTODO status values as + # NEEDS-ACTION, IN-PROCESS, COMPLETED, and CANCELLED. + sh:property [ + sh:path cal:status ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:in ( + "NEEDS-ACTION" + "IN-PROCESS" + "COMPLETED" + "CANCELLED" + ) ; + sh:name "Status" ; + sh:description "Overall status of the task (RFC 5545 STATUS for VTODO): NEEDS-ACTION, IN-PROCESS, COMPLETED, or CANCELLED." ; + sh:codeIdentifier "status"; + ] ; + + # Priority. RFC 5545 §3.8.1.9 defines an integer 0-9 (0 = undefined, + # 1 = highest, 9 = lowest). + sh:property [ + sh:path cal:priority ; + sh:datatype xsd:integer ; + sh:minInclusive 0 ; + sh:maxInclusive 9 ; + sh:maxCount 1 ; + sh:name "Priority" ; + sh:description "Relative priority of the task (RFC 5545 PRIORITY): integer 0-9 where 0 is undefined, 1 is highest and 9 is lowest." ; + sh:codeIdentifier "priority"; + ] ; + + # Percent complete (0-100). + sh:property [ + sh:path cal:percentComplete ; + sh:datatype xsd:integer ; + sh:minInclusive 0 ; + sh:maxInclusive 100 ; + sh:maxCount 1 ; + sh:name "Percent Complete" ; + sh:description "Percentage completion of the task as an integer 0-100 (RFC 5545 PERCENT-COMPLETE)." ; + sh:codeIdentifier "percentComplete"; + ] ; + + # Categories. RFC 5545 allows a comma-separated TEXT list; in RDF this is + # commonly serialised as one literal per cal:categories triple. + sh:property [ + sh:path cal:categories ; + sh:datatype xsd:string ; + sh:name "Categories" ; + sh:description "Categories or tags assigned to the task (RFC 5545 CATEGORIES). May be repeated to assign multiple categories." ; + sh:codeIdentifier "categories"; + ] . From c04fff7abe5e4d9abc26e3d9d33fc82c15c80f73 Mon Sep 17 00:00:00 2001 From: Jesse Wright <63333554+jeswr@users.noreply.github.com> Date: Thu, 23 Apr 2026 02:31:07 +0100 Subject: [PATCH 2/2] Drop unused prefixes; document percentComplete cross-field semantics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove rdf: and rdfs: prefix declarations that were not used. - Note in cal:percentComplete description that RFC 5545 §3.8.1.11 ties the value to status (0 when NEEDS-ACTION, 100 when COMPLETED, meaningful when IN-PROCESS); the shape does not enforce that cross-field relationship in line with the catalogue's Interoperability First design principle. Co-Authored-By: Claude Opus 4.7 (1M context) --- shapes/task.ttl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shapes/task.ttl b/shapes/task.ttl index 78b4f1a..2ed15d1 100644 --- a/shapes/task.ttl +++ b/shapes/task.ttl @@ -2,8 +2,6 @@ @prefix dc: . @prefix dct: . @prefix prov: . -@prefix rdf: . -@prefix rdfs: . @prefix sh: . @prefix vs: . @prefix xsd: . @@ -107,7 +105,7 @@ task_shape:TaskShape sh:maxInclusive 100 ; sh:maxCount 1 ; sh:name "Percent Complete" ; - sh:description "Percentage completion of the task as an integer 0-100 (RFC 5545 PERCENT-COMPLETE)." ; + sh:description "Percentage completion of the task as an integer 0-100 (RFC 5545 PERCENT-COMPLETE). Per RFC 5545 §3.8.1.11, this property is most meaningful when status is IN-PROCESS, and conventionally 0 when NEEDS-ACTION and 100 when COMPLETED. The shape does not enforce that cross-field relationship." ; sh:codeIdentifier "percentComplete"; ] ;