Skip to content

Add Task/TODO shape (RFC 5545 iCalendar VTODO)#62

Draft
jeswr wants to merge 2 commits intosolid:mainfrom
jeswr:feat/task-shape
Draft

Add Task/TODO shape (RFC 5545 iCalendar VTODO)#62
jeswr wants to merge 2 commits intosolid:mainfrom
jeswr:feat/task-shape

Conversation

@jeswr
Copy link
Copy Markdown
Member

@jeswr jeswr commented Apr 23, 2026

Type of Change

* [x] New domain file
* [ ] Update existing domain file
* [ ] Documentation only

Domain

Domain file:        shapes/task.ttl
Purpose of domain:  Validation shape for tasks / TODO items.
Intended use cases: Personal task managers, to-do list apps, and any
                    Solid app that needs to record actionable items
                    for a user with status, due date, and priority.

Shape Details

Shape name(s):      task_shape:TaskShape
Target class/node:  cal:Vtodo
Files changed:      shapes/task.ttl (new)

Shape Change

* [x] New shape
* [ ] New version of existing shape
* [ ] Non-breaking constraint addition
* [ ] Documentation update

Description:

Adds a SHACL shape for cal:Vtodo grounded in the
W3C iCalendar in RDF vocabulary,
which mirrors the iCalendar VTODO calendar component defined in
RFC 5545 §3.6.2.

This sits alongside the existing meeting.ttl and event.ttl
domain files (both targeting cal:Vevent) and reuses the
W3C iCalendar in RDF vocabulary they already use.

Constraints cover:

  • cal:summary (xsd:string, max 1) – short title
  • cal:description (xsd:string, max 1) – longer description
  • cal:dtstart (xsd:date or xsd:dateTime, max 1)
  • cal:due (xsd:date or xsd:dateTime, max 1)
  • cal:status (xsd:string, max 1, enum
    NEEDS-ACTION / IN-PROCESS / COMPLETED / CANCELLED
    per RFC 5545 §3.8.1.11 for VTODO)
  • cal:priority (xsd:integer 0-9 per RFC 5545 §3.8.1.9)
  • cal:percentComplete (xsd:integer 0-100; cross-field
    semantics with cal:status are documented but not enforced)
  • cal:categories (xsd:string, repeatable)

Immutability Confirmation

* [x] Existing constraints were not modified
* [x] Previously valid data remains valid
* [x] If behaviour changed, a new shape/version was introduced

(New file – no existing shapes were touched.)


Examples

Valid example

@prefix cal: <http://www.w3.org/2002/12/cal/ical#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

</tasks/buy-milk>
    a cal:Vtodo ;
    cal:summary "Buy milk" ;
    cal:description "Two litres, semi-skimmed." ;
    cal:due "2026-04-25"^^xsd:date ;
    cal:status "NEEDS-ACTION" ;
    cal:priority 5 ;
    cal:percentComplete 0 ;
    cal:categories "shopping" , "errands" .

Invalid example

@prefix cal: <http://www.w3.org/2002/12/cal/ical#> .

</tasks/bad>
    a cal:Vtodo ;
    cal:status "DONE" ;             # Not in {NEEDS-ACTION, IN-PROCESS, COMPLETED, CANCELLED}
    cal:priority 11 ;               # Out of 0-9 range
    cal:percentComplete 150 .       # Out of 0-100 range

Compatibility

* [x] Fully backwards compatible
* [ ] May cause new validation failures
* [ ] Breaking change

New domain file. No existing shape touched. Reuses the same
cal: namespace as meeting.ttl and event.ttl for a different
target class (cal:Vtodo).


Validation

* [x] SHACL validation run
* [x] Example data tested

Tools used: pyshacl, plus the repository's scripts/validate-shacl-shapes-file.py, scripts/check-metadata-and-immutability-file.py, and scripts/check-namespaces-and-names-file.py.


Reviewer Checklist

* [ ] Immutability respected
* [ ] Targeting is correct
* [ ] Constraints justified
* [ ] Examples match expected behaviour

jeswr and others added 2 commits April 23, 2026 02:29
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) <noreply@anthropic.com>
- 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) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 23, 2026 01:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new SHACL domain shape for task/TODO resources (cal:Vtodo) using the W3C iCalendar-in-RDF vocabulary, aligned with RFC 5545’s VTODO component. This extends the repository’s existing calendar-related shapes (e.g., meeting.ttl, event.ttl) with a task-focused validation shape.

Changes:

  • Introduces task_shape:TaskShape targeting cal:Vtodo.
  • Adds SHACL property constraints for core VTODO fields (summary, description, dtstart, due, status enum, priority range, percentComplete range, repeatable categories).
  • Includes standard shape metadata (dct:created, vs:term_status, provenance links, references, sh:codeIdentifier).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeswr jeswr marked this pull request as draft April 23, 2026 12:51
@jeswr jeswr marked this pull request as draft April 23, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants