fep

FEP-c5a1: To-do’s

Summary

This document describes an implementation of simple to-do’s or tasks based on ActivityPub protocol and Valueflows vocabulary. A to-do is a simple work commitment, and can be created for oneself or another person. Optionally, when the to-do is done, that can be recorded also.

History

This is a parallel submission to FEP-3264 Federated Work Coordination, which supports much more complex project or production planning. Both planning submissions continue the idea of Valueflows extensions to ActivityPub/ActivityStreams based on use case, started by silverpill with FEP-0837 Federated Marketplace.

Requirements

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC-2119.

Creating a to-do

A to-do is implemented as a Valueflows Commitment.

Consuming implementations which don’t have planning features MAY display plan-related objects similarly to Note objects.

In all cases, the objects can also be discussed using Note objects and replyTo.

Valueflows defines a commitment is defined as A planned economic flow that has been promised by an agent to another agent.

Example:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/",
      "vf": "https://w3id.org/valueflows/ont/vf#",
      "Commitment": "vf:Commitment",
      "receiver": "vf:receiver",
      "provider": "vf:provider",
      "resourceConformsTo": "vf:resourceConformsTo",
      "effortQuantity": "vf:effortQuantity",
      "hasUnit": "om2:hasUnit",
      "hasNumericalValue": "om2:hasNumericalValue"
    }
  ],
  "type": "Create",
  "id": "https://project.example/activities/ad2f7ee1-6567-413e-a10b-72650cbdc788/create",
  "actor": "https://project.example/actors/alice",
  "object": {
    "type": "Commitment",
    "id": "https://project.example/todos/ddde9d6f-6f3b-4770-a966-4dkjh8w32e59",
    "attributedTo": "https://project.example/actors/alice",
    "content": "Please proofread the document at https://project.example/docs/45, and let me know what you think could be improved.",
    "published": "2024-05-18T19:22:03.918737Z",
    "resourceConformsTo": "https://www.wikidata.org/wiki/Q834191",
    "effortQuantity": {
      "hasUnit": "hour",
      "hasNumericalValue": "2"
    },
    "provider": "https://project.example/actors/bob",
    "receiver": "https://project.example/actors/alice"
  },
  "to": "https://project.example/actors/bob"
}

Accepting a To-do

Accepting or rejecting a to-do is OPTIONAL for this FEP, although it may be required based on the understanding between the actors.

The object of Accept activity MUST be the id of the Commitment object previously sent to the actor.

Activity MAY contain content property for further coordination.

Example:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Accept",
  "id": "https://project.example/todos/ddde9d6f-6f3b-4770-a966-9kh93jcmljei",
  "actor": "https://project.example/actors/bob",
  "object": "https://project.example/todos/ddde9d6f-6f3b-4770-a966-4dkjh8w32e59",
  "content": "Should be done within a couple days.",
  "to": "https://project.example/actors/alice"
}

Rejecting a To-do

Accepting or rejecting a to-do is OPTIONAL for this FEP, although it may be required based on the understanding between the actors.

The object of Reject activity MUST be the id of the Commitment object previously sent to the actor.

Activity MAY contain content property indicating the reason for rejection.

Example:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Reject",
  "id": "https://project.example/todos/8c05f97f-1531-4b70-9ca8-4ee4a09f36a3",
  "actor": "https://project.example/actors/bob",
  "object": "https://project.example/todos/ddde9d6f-6f3b-4770-a966-4dkjh8w32e59",
  "content": "Sorry, my schedule is full for a month.",
  "to": "https://project.example/actors/alice"
}

Recording what actually was done

Recording what was done is OPTIONAL for the FEP, although it may be required by the actors involved.

Actual economic activity is represented with an EconomicEvent in Valueflows. In the case of to-do’s, it would only occur in response to an earlier to-do commitment. More than one EconomicEvent can be recorded for one Commitment to-do.

The representation of an economic event is a JSON document with the following properties:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/",
      "vf": "https://w3id.org/valueflows/ont/vf#",
      "EconomicEvent": "vf:EconomicEvent",
      "fulfills": "vf:fulfills",
      "receiver": "vf:receiver",
      "provider": "vf:provider",
      "resourceConformsTo": "vf:resourceConformsTo",
      "effortQuantity": "vf:effortQuantity",
      "hasUnit": "om2:hasUnit",
      "hasNumericalValue": "om2:hasNumericalValue",
      "finished": "vf:finished"
    }
  ],
  "type": "Create",
  "id": "https://project.example/activities/ad2f7ee1-6567-413e-a10b-72650cbdc932/create",
  "actor": "https://project.example/actors/bob",
  "object": {
    "type": "EconomicEvent",
    "id": "https://project.example/inputs/ad2f7ee1-6567-413e-a10b-72650cbdc932",
    "attributedTo": "https://project.example/actors/bob",
    "published": "2024-10-21T14:16:41.843794Z",
    "fulfills": "https://project.example/todos/ddde9d6f-6f3b-4770-a966-4dkjh8w32e59",
    "resourceConformsTo": "https://www.wikidata.org/wiki/Q3485549",
    "effortQuantity": {
      "hasUnit": "hour",
      "hasNumericalValue": "1.5"
    },
    "provider": "https://project.example/actors/bob",
    "receiver": "https://project.example/actors/alice",
    "finished": true
  },
  "to": "https://project.example/actors/alice"
}

The Commitment can alternatively be marked as finished, without recording an EconomicEvent. This could occur in cases where no work will be done, or work was done but will not be recorded, or some work was recorded earlier without marking the to-do finished. So, finished does not imply that the to-do was done, only that it is not waiting to be done any more.

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/",
      "vf": "https://w3id.org/valueflows/ont/vf#",
      "Commitment": "vf:Commitment",
      "finished": "vf:finished"
    }
  ],
  "type": "Update",
  "id": "https://project.example/activities/ad2f7ee1-6567-413e-a10b-72650cbdc932/update",
  "actor": "https://project.example/actors/alice",
  "object": {
    "type": "Commitment",
    "id": "https://project.example/todos/ddde9d6f-6f3b-4770-a966-4dkjh8w32e59",
    "attributedTo": "https://project.example/actors/alice",
    "published": "2024-10-24T16:16:41.843794Z",
    "finished": true
  },
  "to": "https://project.example/actors/alice"
}

References

CC0 1.0 Universal (CC0 1.0) Public Domain Dedication

To the extent possible under law, the authors of this Fediverse Enhancement Proposal have waived all copyright and related or neighboring rights to this work.