diff --git a/ERD.puml b/ERD.puml index 20c8fce7..b74c47c4 100644 --- a/ERD.puml +++ b/ERD.puml @@ -60,25 +60,43 @@ dataclass activity <> #B4E5D0 { description? image? workScope? - startDate - endDate + startDate? + endDate? + contributors[]? contributions[]? - location? + locations[]? rights? project? createdAt !endif } -' org.hypercerts.claim.evidence -dataclass evidence { +' org.hypercerts.claim.attachment +dataclass attachment { !if (SHOW_FIELDS == "true") - subject? - content + subjects[]? + attachmentType? + relationType? + contributors[] title shortDescription? description? - relationType? + content[]? + locations[]? + createdAt + !endif +} + +' org.hypercerts.claim.outcome +dataclass outcome { + !if (SHOW_FIELDS == "true") + title + shortDescription? + description? + relatedActivities[]? + startDate? + endDate? + locations[]? createdAt !endif } @@ -86,14 +104,18 @@ dataclass evidence { ' org.hypercerts.claim.measurement dataclass measurement { !if (SHOW_FIELDS == "true") - subject? - measurers[] + subjects[]? + contributors[] metric + unit value - methodType? - methodURI? - evidenceURI[]? - location? + startDate? + endDate? + measurementMethodType? + measurementMethodUri? + resources[]? + comment? + locations[]? createdAt !endif } @@ -101,13 +123,14 @@ dataclass measurement { ' org.hypercerts.claim.evaluation dataclass evaluation { !if (SHOW_FIELDS == "true") - subject? - summary - evaluators[] - content[]? + subject + evaluationDimension? + contributors[] + inputs[]? measurements[]? - score - location? + summary? + score? + locations[]? createdAt !endif } @@ -115,6 +138,7 @@ dataclass evaluation { ' org.hypercerts.claim.contribution dataclass contribution { !if (SHOW_FIELDS == "true") + subject role? contributors[] description? @@ -173,7 +197,7 @@ dataclass rights { rightsName rightsType rightsDescription - attachment? + documents[]? createdAt !endif } @@ -183,8 +207,9 @@ dataclass collection { !if (SHOW_FIELDS == "true") title shortDescription? + description? avatar? - coverPhoto? + coverImage? activities[] createdAt !endif @@ -197,9 +222,9 @@ dataclass project { shortDescription description? avatar? - coverPhoto? + coverImage? activities[]? - location? + locations[]? createdAt !endif } @@ -258,12 +283,14 @@ activity -l[hidden]-> token 'contribution -r[hidden]-> contributor 'fundingReceipt -[hidden]-> contributor -evaluation::subject --> evidence -evaluation::measurements --> measurement evaluation::subject --> activity +evaluation::subject --> outcome +evaluation::subject --> measurement +evaluation::subject --> attachment +evaluation::measurements --> measurement ' Impossible to get this one on without screwing up the layout -'evaluation::location --[norank]-> location +'evaluation::locations --[norank]-> location ' so instead make a dangling arrow using a hidden class skinparam class { @@ -273,7 +300,7 @@ skinparam class { } class " " as hiddenLocation1 <> hide hiddenLocation1 circle -evaluation::location --> hiddenLocation1 +evaluation::locations --> hiddenLocation1 !if (SHOW_FIELDS == "true") ' Also ensure the hidden class is somewhere "en route" to location hiddenLocation1 -[hidden]-> activity @@ -282,15 +309,22 @@ hiddenLocation1 -[hidden]-> activity 'evaluation -d[norank]--> location !endif -evidence::subject --> activity +attachment::subjects --> activity +attachment::subjects --> outcome +attachment::subjects --> measurement +attachment::subjects --> evaluation + +outcome::relatedActivities --> activity -measurement::subject --> activity +measurement::subjects --> activity +measurement::subjects --> outcome +measurement::subjects --> evaluation ' Somewhat similarly for measurement --> location !if (SHOW_FIELDS == "true") class " " as hiddenLocation2 <> hide hiddenLocation2 circle -measurement::location --> hiddenLocation2 +measurement::locations --> hiddenLocation2 ' Also ensure the hidden class is somewhere "en route" to location hiddenLocation2 -[hidden]-> location !else @@ -300,13 +334,17 @@ measurement --> location collection::activities --> activity project::activities --> activity -project::location --> location +project::locations --> location activity::contributions -l--> contribution activity::rights --> rights -activity::location --> location +activity::locations --> location activity::project --> project +activity::contributors --> contributor : made by +contribution::subject --> activity +contribution::subject --> measurement +contribution::subject --> attachment contribution::contributors --> contributor : made by ' These ones are not described by any lexicon, but are added to diff --git a/README.md b/README.md index 87a9a19f..f168fe2d 100644 --- a/README.md +++ b/README.md @@ -173,20 +173,22 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | Comments | -| ------------------ | -------- | -------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `title` | `string` | ✅ | Title of the hypercert | | -| `shortDescription` | `string` | ✅ | Short blurb of the impact work done. | | -| `description` | `string` | ❌ | Optional longer description of the impact work done. | | -| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob | | -| `workScope` | `object` | ❌ | Logical scope of the work using label-based conditions | Object with `withinAllOf`, `withinAnyOf`, `withinNoneOf` arrays of labels | -| `startDate` | `string` | ✅ | When the work began | | -| `endDate` | `string` | ✅ | When the work ended | | -| `contributions` | `array` | ❌ | A strong reference to the contributions done to create the impact in the hypercerts | References must conform to `org.hypercerts.claim.contribution` | -| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has | References must conform to `org.hypercerts.claim.rights` | -| `location` | `ref` | ❌ | A strong reference to the location where the work for done hypercert was located | References must conform to `app.certified.location` | -| `project` | `string` | ❌ | A reference (AT-URI) to the project record that this activity is part of | References must conform to `org.hypercerts.claim.project` | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| ------------------------ | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `title` | `string` | ✅ | Title of this activity claim. | | +| `shortDescription` | `string` | ✅ | Short summary of this activity claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | | +| `shortDescriptionFacets` | `array` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | | +| `description` | `string` | ❌ | Optional longer description of this activity claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | | +| `descriptionFacets` | `array` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | | +| `image` | `union` | ❌ | The hypercert visual representation as a URI or image blob | | +| `project` | `string` | ❌ | A reference (AT-URI) to the project record that this activity is part of. The record referenced must conform with the lexicon org.hypercerts.claim.project. This activity must also be referenced by the project, establishing a bidirectional link. | References must conform to `org.hypercerts.claim.project` | +| `contributors` | `array` | ❌ | List of contributors to this activity with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records. | | +| `workScope` | `object` | ❌ | Logical scope of the work using label-based conditions | Object with `withinAllOf`, `withinAnyOf`, `withinNoneOf` arrays of labels | +| `startDate` | `string` | ❌ | The start date and time when the work began. | | +| `endDate` | `string` | ❌ | The end date and time when the work ended. | | +| `locations` | `array` | ❌ | Optional geographic references related to the location of the activity. | References must conform to `app.certified.location` | +| `rights` | `ref` | ❌ | A strong reference to the rights that this hypercert has. | References must conform to `org.hypercerts.claim.rights` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | #### Defs @@ -209,14 +211,16 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | -| -------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `role` | `string` | ❌ | Role or title of the contributor(s). | -| `contributors` | `array` | ✅ | List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role. | -| `description` | `string` | ❌ | What the contribution concretely achieved | -| `startDate` | `string` | ❌ | When this contribution started. This should be a subset of the hypercert timeframe. | -| `endDate` | `string` | ❌ | When this contribution finished. This should be a subset of the hypercert timeframe. | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | +| Property | Type | Required | Description | +| ------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `subject` | `ref` | ✅ | A reference to the subject that the contributors contributed to. This may be an activity claim, measurement, or attachment. | +| `role` | `string` | ❌ | Role or title of the contributor(s). | +| `contributors` | `array` | ✅ | List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role. | +| `description` | `string` | ❌ | What the contribution concretely entailed. Rich text annotations may be provided via `descriptionFacets`. | +| `descriptionFacets` | `array` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | +| `startDate` | `string` | ❌ | The start date and time when this contribution started. This should be a subset of the hypercert timeframe. | +| `endDate` | `string` | ❌ | The end date and time when this contribution finished. This should be a subset of the hypercert timeframe. | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | --- @@ -230,38 +234,70 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | Comments | -| -------------- | -------- | -------- | --------------------------------------------------------------------------- | ------------------------------------------------------------- | -| `subject` | `ref` | ❌ | A strong reference to what is being evaluated | (e.g activity, measurement, contribution, etc.) | -| `evaluators` | `array` | ✅ | DIDs of the evaluators | | -| `content` | `array` | ❌ | Evaluation data (URIs or blobs) containing detailed reports or methodology | | -| `measurements` | `array` | ❌ | Optional references to the measurements that contributed to this evaluation | References must conform to `org.hypercerts.claim.measurement` | -| `summary` | `string` | ✅ | Brief evaluation summary | | -| `score` | `object` | ❌ | Optional overall score for this evaluation on a numeric scale | Object with `min`, `max`, and `value` (integers) | -| `location` | `ref` | ❌ | An optional reference for georeferenced evaluations | References must conform to `app.certified.location` | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| --------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- | +| `subject` | `ref` | ✅ | A reference to the evaluated subject. This may be an activity claim, outcome claim, measurement, attachment, or even another evaluation. An evaluation always refers to only a single evaluated subject (unlike other claim types that may reference multiple subjects). | | +| `evaluationDimension` | `string` | ❌ | The aspect/dimension being evaluated, e.g. activityValidity, evidenceQuality, contributionAssessment, or fundingWorthiness. | | +| `contributors` | `array` | ✅ | List of contributors to this evaluation with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records. | | +| `inputs` | `array` | ❌ | Evaluation data containing detailed reports, data, or methodology, that have been used as inputs for the evaluation. | URIs or blobs | +| `measurements` | `array` | ❌ | Optional references to the measurements that contributed to this evaluation. | References must conform to `org.hypercerts.claim.measurement` | +| `summary` | `string` | ❌ | A brief, human-readable summary of the evaluation and its main conclusions. Rich text annotations may be provided via `summaryFacets`. | | +| `summaryFacets` | `array` | ❌ | Rich text annotations for `summary` (mentions, URLs, hashtags, etc). | | +| `score` | `object` | ❌ | Optional overall score for this evaluation on a numeric scale | Object with `min`, `max`, and `value` (integers) | +| `locations` | `array` | ❌ | Optional geographic references related to this evaluation. | References must conform to `app.certified.location` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | --- -### Hypercerts Evidence +### Hypercerts Attachment -**Lexicon ID:** `org.hypercerts.claim.evidence` +**Lexicon ID:** `org.hypercerts.claim.attachment` -**Description:** A piece of evidence related to a hypercert record (e.g. an activity, project, claim, or evaluation). Evidence may support, clarify, or challenge the referenced subject. +**Description:** An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation). Attachments may support, clarify, or challenge the referenced subject. **Key:** `tid` #### Properties -| Property | Type | Required | Description | Comments | -| ------------------ | -------- | -------- | ----------------------------------------------------------------- | ---------------------------------------------------- | -| `subject` | `ref` | ❌ | A strong reference to the record this evidence relates to | (e.g. an activity, project, claim, or evaluation) | -| `content` | `union` | ✅ | A piece of evidence (URI or blob) related to the subject record | May support, clarify, or challenge a hypercert claim | -| `title` | `string` | ✅ | Title to describe the nature of the evidence | | -| `shortDescription` | `string` | ❌ | Short description explaining what this evidence shows | | -| `description` | `string` | ❌ | Longer description describing the evidence in more detail | | -| `relationType` | `string` | ❌ | How this evidence relates to the subject | Known values: `supports`, `challenges`, `clarifies` | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| ------------------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | +| `subjects` | `array` | ❌ | References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded. | | +| `attachmentType` | `string` | ❌ | The type of attachment, e.g. report, audit, evidence, testimonial, methodology, etc. | | +| `relationType` | `string` | ❌ | How this attachment relates to the subject. If omitted, the attachment is not asserting a specific relationship. | Known values: `supports`, `challenges`, `clarifies` | +| `contributors` | `array` | ✅ | List of contributors to this attachment with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records. | | +| `title` | `string` | ✅ | Title of this attachment. | | +| `shortDescription` | `string` | ❌ | Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | | +| `shortDescriptionFacets` | `array` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | | +| `description` | `string` | ❌ | Optional longer description of this attachment, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | | +| `descriptionFacets` | `array` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | | +| `content` | `array` | ❌ | The files, documents, or external references included in this attachment record. | URIs or blobs | +| `locations` | `array` | ❌ | Optional geographic references that this attachment relates to. | References must conform to `app.certified.location` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | + +--- + +### Hypercerts Outcome + +**Lexicon ID:** `org.hypercerts.claim.outcome` + +**Description:** An outcome claim describing a valuable goal or observed change. Outcomes can stand alone and be linked to activities later. + +**Key:** `tid` + +#### Properties + +| Property | Type | Required | Description | Comments | +| ------------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | +| `title` | `string` | ✅ | A statement of the goal or observed change. | | +| `shortDescription` | `string` | ❌ | Short summary of this outcome claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | | +| `shortDescriptionFacets` | `array` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | | +| `description` | `string` | ❌ | Optional longer description of this outcome claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | | +| `descriptionFacets` | `array` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | | +| `relatedActivities` | `array` | ❌ | Optional references to activity claims that may have contributed. Links can be added later as understanding of (causal) relationships develops. | | +| `startDate` | `string` | ❌ | The start date and time when the outcome was observed or is expected. | | +| `endDate` | `string` | ❌ | The end date and time when the outcome was observed or is expected. | | +| `locations` | `array` | ❌ | Optional geographic references related to this outcome. | References must conform to `app.certified.location` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | --- @@ -275,17 +311,22 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | Comments | -| ------------- | -------- | -------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------ | -| `subject` | `ref` | ❌ | A strong reference to the record this measurement refers to | (e.g. an activity, project, or claim) | -| `measurers` | `array` | ✅ | DIDs of the entity (or entities) that measured this data | | -| `metric` | `string` | ✅ | The metric being measured | | -| `value` | `string` | ✅ | The measured value | | -| `methodType` | `string` | ❌ | Short identifier for the measurement methodology | | -| `methodURI` | `string` | ❌ | URI to methodology documentation, standard protocol, or measurement procedure | | -| `evidenceURI` | `array` | ❌ | URIs to related evidence or underlying data | (e.g. org.hypercerts.claim.evidence records or raw datasets) | -| `location` | `ref` | ❌ | A strong reference to the location where the measurement was taken | References must conform to `app.certified.location` | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| ----------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | +| `subjects` | `array` | ❌ | References to the subject(s) the measurement is connected to—this may be an activity claim, outcome claim, evaluation, or even another measurement. This is optional as the measurement can exist before the claim is recorded. | | +| `contributors` | `array` | ✅ | List of contributors to this measurement with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records. | | +| `metric` | `string` | ✅ | The metric being measured, e.g. forest area restored, number of users, etc. | | +| `unit` | `string` | ✅ | The unit of the measured value (e.g. kg CO₂e, hectares, %, index score). | | +| `value` | `string` | ✅ | The measured numeric value. | | +| `startDate` | `string` | ❌ | The start date and time when the measurement began. | | +| `endDate` | `string` | ❌ | The end date and time when the measurement ended. If it was a one time measurement, the endDate should be equal to the startDate. | | +| `measurementMethodType` | `string` | ❌ | Short identifier for the measurement methodology | | +| `measurementMethodUri` | `string` | ❌ | URI pointing to detailed methodology documentation, a standard protocol, or a measurement procedure. | | +| `resources` | `array` | ❌ | Files, documents, or external references related to the measurement. | URIs or blobs | +| `comment` | `string` | ❌ | Short comment of this measurement, suitable for previews and list views. Rich text annotations may be provided via `commentFacets`. | | +| `commentFacets` | `array` | ❌ | Rich text annotations for `comment` (mentions, URLs, hashtags, etc). | | +| `locations` | `array` | ❌ | Optional geographic references related to where the measurement was taken. | References must conform to `app.certified.location` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | --- @@ -299,14 +340,17 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | Comments | -| ------------------ | -------- | -------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `title` | `string` | ✅ | The title of this collection | | -| `shortDescription` | `string` | ❌ | A short description of this collection | | -| `avatar` | `blob` | ❌ | Primary avatar image representing this collection across apps and views | Typically a square image | -| `coverPhoto` | `blob` | ❌ | The cover photo of this collection | | -| `activities` | `array` | ✅ | Array of activities with their associated weights in this collection | Each item references `org.hypercerts.claim.activity#activityWeight` | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| ------------------------ | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | +| `title` | `string` | ✅ | Title of this collection. | | +| `shortDescription` | `string` | ❌ | Short summary of this collection, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. | | +| `shortDescriptionFacets` | `array` | ❌ | Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). | | +| `description` | `string` | ❌ | Optional longer description of this collection, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. | | +| `descriptionFacets` | `array` | ❌ | Rich text annotations for `description` (mentions, URLs, hashtags, etc). | | +| `avatar` | `blob` | ❌ | Primary avatar image representing this collection across apps and views | Typically a square image | +| `coverImage` | `blob` | ❌ | The cover image of this collection | | +| `activities` | `array` | ✅ | Array of activities with their associated weights in this collection | Each item references `org.hypercerts.defs#weightedActivity` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | --- @@ -320,16 +364,16 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | Comments | -| ------------------ | -------- | -------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `title` | `string` | ✅ | Title of this project | | -| `shortDescription` | `string` | ✅ | Short summary of this project, suitable for previews and list views | | -| `description` | `ref` | ❌ | Rich-text description of this project, represented as a Leaflet linear document | References must conform to `pub.leaflet.pages.linearDocument#main` | -| `avatar` | `blob` | ❌ | Primary avatar image representing this project across apps and views | Typically a square logo or project identity image | -| `coverPhoto` | `blob` | ❌ | The cover photo of this project | | -| `activities` | `array` | ❌ | Array of activities with their associated weights in this project | Each item references `org.hypercerts.claim.activity#activityWeight` | -| `location` | `ref` | ❌ | A strong reference to a location record describing where the work took place | References must conform to `app.certified.location` | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| ------------------ | -------- | -------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| `title` | `string` | ✅ | Title of this project. | | +| `shortDescription` | `string` | ✅ | Short summary of this project, suitable for previews and list views. | | +| `description` | `ref` | ❌ | Rich-text description of this project, represented as a Leaflet linear document | References must conform to `pub.leaflet.pages.linearDocument#main` | +| `avatar` | `blob` | ❌ | Primary avatar image representing this project across apps and views | Typically a square logo or project identity image | +| `coverImage` | `blob` | ❌ | The cover image of this project. | | +| `activities` | `array` | ❌ | Array of activities with their associated weights in this project | Each item references `org.hypercerts.defs#weightedActivity` | +| `locations` | `array` | ❌ | Optional geographic references related to the location of the project. | References must conform to `app.certified.location` | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | --- @@ -343,13 +387,13 @@ Hypercerts-specific lexicons for tracking impact work and claims. #### Properties -| Property | Type | Required | Description | Comments | -| ------------------- | -------- | -------- | ----------------------------------------------------------------- | ----------- | -| `rightsName` | `string` | ✅ | Full name of the rights | | -| `rightsType` | `string` | ✅ | Short rights identifier for easier search | | -| `rightsDescription` | `string` | ✅ | Description of the rights of this hypercert | | -| `attachment` | `union` | ❌ | An attachment to define the rights further, e.g. a legal document | URI or blob | -| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | +| Property | Type | Required | Description | Comments | +| ------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------- | ------------- | +| `rightsName` | `string` | ✅ | Full name of the rights | | +| `rightsType` | `string` | ✅ | Short rights identifier for easier search | | +| `rightsDescription` | `string` | ✅ | Description of the rights of this hypercert | | +| `documents` | `array` | ❌ | The files, documents, or external references to define the rights further, e.g. a legal document. | URIs or blobs | +| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | | --- @@ -384,5 +428,6 @@ Hypercerts-specific lexicons for tracking impact work and claims. - All timestamps use the `datetime` format (ISO 8601) - Strong references (`com.atproto.repo.strongRef`) include both the URI and CID of the referenced record - Union types allow multiple possible formats (e.g., URI or blob) +- Rich text facet arrays (e.g., `descriptionFacets`, `summaryFacets`) are arrays of `app.bsky.richtext.facet` - Array items may have constraints like `maxLength` to limit the number of elements - String fields may have both `maxLength` (bytes) and `maxGraphemes` (Unicode grapheme clusters) constraints diff --git a/lexicons/app/bsky/richtext/facet.json b/lexicons/app/bsky/richtext/facet.json new file mode 100644 index 00000000..388a3a5e --- /dev/null +++ b/lexicons/app/bsky/richtext/facet.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "app.bsky.richtext.facet", + "defs": { + "main": { + "type": "object", + "description": "Annotation of a sub-string within rich text.", + "required": ["index", "features"], + "properties": { + "index": { "type": "ref", "ref": "#byteSlice" }, + "features": { + "type": "array", + "items": { "type": "union", "refs": ["#mention", "#link", "#tag"] } + } + } + }, + "mention": { + "type": "object", + "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, + "link": { + "type": "object", + "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "uri" } + } + }, + "tag": { + "type": "object", + "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", + "required": ["tag"], + "properties": { + "tag": { "type": "string", "maxLength": 640, "maxGraphemes": 64 } + } + }, + "byteSlice": { + "type": "object", + "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.", + "required": ["byteStart", "byteEnd"], + "properties": { + "byteStart": { "type": "integer", "minimum": 0 }, + "byteEnd": { "type": "integer", "minimum": 0 } + } + } + } +} diff --git a/lexicons/app/certified/badge/definition.json b/lexicons/app/certified/badge/definition.json index 77291585..c0c99ad5 100644 --- a/lexicons/app/certified/badge/definition.json +++ b/lexicons/app/certified/badge/definition.json @@ -31,7 +31,17 @@ }, "description": { "type": "string", - "description": "Optional short statement describing what the badge represents." + "description": "Optional short statement describing what the badge represents. Rich text annotations may be provided via `descriptionFacets`.", + "maxLength": 30000, + "maxGraphemes": 3000 + }, + "descriptionFacets": { + "type": "array", + "description": "Rich text annotations for `description` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } }, "allowedIssuers": { "type": "array", diff --git a/lexicons/org/hypercerts/claim/activity.json b/lexicons/org/hypercerts/claim/activity.json index dbd23ae1..fbd69e97 100644 --- a/lexicons/org/hypercerts/claim/activity.json +++ b/lexicons/org/hypercerts/claim/activity.json @@ -8,31 +8,41 @@ "key": "any", "record": { "type": "object", - "required": [ - "title", - "shortDescription", - "createdAt", - "startDate", - "endDate" - ], + "required": ["title", "shortDescription", "createdAt"], "properties": { "title": { "type": "string", - "description": "Title of the hypercert.", + "description": "Title of this activity claim.", "maxLength": 256 }, "shortDescription": { "type": "string", - "description": "Short blurb of the impact work done.", + "description": "Short summary of this activity claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`.", "maxLength": 3000, "maxGraphemes": 300 }, + "shortDescriptionFacets": { + "type": "array", + "description": "Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, "description": { "type": "string", - "description": "Optional longer description of the impact work done.", + "description": "Optional longer description of this activity claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`.", "maxLength": 30000, "maxGraphemes": 3000 }, + "descriptionFacets": { + "type": "array", + "description": "Rich text annotations for `description` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, "image": { "type": "union", "refs": [ @@ -41,6 +51,19 @@ ], "description": "The hypercert visual representation as a URI or image blob." }, + "project": { + "type": "string", + "format": "at-uri", + "description": "A reference (AT-URI) to the project record that this activity is part of. The record referenced must conform with the lexicon org.hypercerts.claim.project. This activity must also be referenced by the project, establishing a bidirectional link." + }, + "contributors": { + "type": "array", + "description": "List of contributors to this activity with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records.", + "items": { + "type": "ref", + "ref": "org.hypercerts.defs#weightedContributor" + } + }, "workScope": { "type": "ref", "ref": "#workScope" @@ -48,40 +71,31 @@ "startDate": { "type": "string", "format": "datetime", - "description": "When the work began" + "description": "The start date and time when the work began." }, "endDate": { "type": "string", "format": "datetime", - "description": "When the work ended" + "description": "The end date and time when the work ended." }, - "contributions": { + "locations": { "type": "array", - "description": "A strong reference to the contributions done to create the impact in the hypercerts. The record referenced must conform with the lexicon org.hypercerts.claim.contribution.", + "description": "Optional geographic references related to the location of the activity. Each referenced record must conform with the app.certified.location lexicon.", "items": { "type": "ref", "ref": "com.atproto.repo.strongRef" - } + }, + "maxLength": 100 }, "rights": { "type": "ref", "ref": "com.atproto.repo.strongRef", "description": "A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights." }, - "location": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to the location where the activity was performed. The record referenced must conform with the lexicon app.certified.location." - }, - "project": { - "type": "string", - "format": "at-uri", - "description": "A reference (AT-URI) to the project record that this activity is part of. The record referenced must conform with the lexicon org.hypercerts.claim.project. This activity must also be referenced by the project, establishing a bidirectional link." - }, "createdAt": { "type": "string", "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" + "description": "Client-declared timestamp when this record was originally created." } } } @@ -94,7 +108,8 @@ "type": "array", "description": "Labels that MUST all hold for the scope to apply.", "items": { - "type": "string" + "type": "string", + "maxLength": 128 }, "maxLength": 100 }, @@ -102,7 +117,8 @@ "type": "array", "description": "Labels of which AT LEAST ONE must hold (optional). If omitted or empty, imposes no additional condition.", "items": { - "type": "string" + "type": "string", + "maxLength": 128 }, "maxLength": 100 }, @@ -110,26 +126,12 @@ "type": "array", "description": "Labels that MUST NOT hold for the scope to apply.", "items": { - "type": "string" + "type": "string", + "maxLength": 128 }, "maxLength": 100 } } - }, - "activityWeight": { - "type": "object", - "required": ["activity", "weight"], - "properties": { - "activity": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to a hypercert activity record. This activity must conform to the lexicon org.hypercerts.claim.activity" - }, - "weight": { - "type": "string", - "description": "The relative weight/importance of this hypercert activity (stored as a string to avoid float precision issues). Weights can be any positive numeric values and do not need to sum to a specific total; normalization can be performed by the consuming application as needed." - } - } } } } diff --git a/lexicons/org/hypercerts/claim/attachment.json b/lexicons/org/hypercerts/claim/attachment.json new file mode 100644 index 00000000..c5cc86d8 --- /dev/null +++ b/lexicons/org/hypercerts/claim/attachment.json @@ -0,0 +1,104 @@ +{ + "lexicon": 1, + "id": "org.hypercerts.claim.attachment", + "defs": { + "main": { + "type": "record", + "description": "An attachment providing commentary, context, evidence, or documentary material related to a hypercert record (e.g. an activity, project, claim, or evaluation). Attachments may support, clarify, or challenge the referenced subject.", + "key": "tid", + "record": { + "type": "object", + "required": ["contributors", "title", "createdAt"], + "properties": { + "subjects": { + "type": "array", + "description": "References to the subject(s) the attachment is connected to—this may be an activity claim, outcome claim, measurement, evaluation, or even another attachment. This is optional as the attachment can exist before the claim is recorded.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "maxLength": 100 + }, + "attachmentType": { + "type": "string", + "maxLength": 64, + "description": "The type of attachment, e.g. report, audit, evidence, testimonial, methodology, etc." + }, + "relationType": { + "type": "string", + "maxLength": 64, + "description": "How this attachment relates to the subject. If omitted, the attachment is not asserting a specific relationship.", + "knownValues": ["supports", "challenges", "clarifies"] + }, + "contributors": { + "type": "array", + "description": "List of contributors to this attachment with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records.", + "items": { + "type": "ref", + "ref": "org.hypercerts.defs#weightedContributor" + } + }, + "title": { + "type": "string", + "maxLength": 256, + "description": "Title of this attachment." + }, + "shortDescription": { + "type": "string", + "description": "Short summary of this attachment, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`.", + "maxLength": 3000, + "maxGraphemes": 300 + }, + "shortDescriptionFacets": { + "type": "array", + "description": "Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, + "description": { + "type": "string", + "description": "Optional longer description of this attachment, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`.", + "maxLength": 30000, + "maxGraphemes": 3000 + }, + "descriptionFacets": { + "type": "array", + "description": "Rich text annotations for `description` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, + "content": { + "type": "array", + "description": "The files, documents, or external references included in this attachment record.", + "items": { + "type": "union", + "refs": [ + "org.hypercerts.defs#uri", + "org.hypercerts.defs#smallBlob" + ] + }, + "maxLength": 100 + }, + "locations": { + "type": "array", + "description": "Optional geographic references that this attachment relates to. Each referenced record must conform with the app.certified.location lexicon.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "maxLength": 100 + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "Client-declared timestamp when this record was originally created." + } + } + } + } + } +} diff --git a/lexicons/org/hypercerts/claim/collection.json b/lexicons/org/hypercerts/claim/collection.json index af96a911..84a3f2af 100644 --- a/lexicons/org/hypercerts/claim/collection.json +++ b/lexicons/org/hypercerts/claim/collection.json @@ -12,15 +12,37 @@ "properties": { "title": { "type": "string", - "description": "The title of this collection", + "description": "Title of this collection.", "maxLength": 800, "maxGraphemes": 80 }, "shortDescription": { "type": "string", + "description": "Short summary of this collection, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`.", "maxLength": 3000, - "maxGraphemes": 300, - "description": "A short description of this collection" + "maxGraphemes": 300 + }, + "shortDescriptionFacets": { + "type": "array", + "description": "Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, + "description": { + "type": "string", + "description": "Optional longer description of this collection, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`.", + "maxLength": 30000, + "maxGraphemes": 3000 + }, + "descriptionFacets": { + "type": "array", + "description": "Rich text annotations for `description` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } }, "avatar": { "type": "blob", @@ -28,24 +50,24 @@ "accept": ["image/png", "image/jpeg"], "maxSize": 1000000 }, - "coverPhoto": { + "coverImage": { "type": "blob", - "description": "The cover photo of this collection.", + "description": "The cover image of this collection.", "accept": ["image/png", "image/jpeg"], "maxSize": 1000000 }, "activities": { "type": "array", - "description": "Array of activities with their associated weights in this collection", + "description": "Array of activities with their associated weights in this collection.", "items": { "type": "ref", - "ref": "org.hypercerts.claim.activity#activityWeight" + "ref": "org.hypercerts.defs#weightedActivity" } }, "createdAt": { "type": "string", "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" + "description": "Client-declared timestamp when this record was originally created." } } } diff --git a/lexicons/org/hypercerts/claim/contribution.json b/lexicons/org/hypercerts/claim/contribution.json index 4fa87d4f..70ad47e1 100644 --- a/lexicons/org/hypercerts/claim/contribution.json +++ b/lexicons/org/hypercerts/claim/contribution.json @@ -8,8 +8,13 @@ "key": "tid", "record": { "type": "object", - "required": ["contributors", "createdAt"], + "required": ["subject", "contributors", "createdAt"], "properties": { + "subject": { + "type": "ref", + "ref": "com.atproto.repo.strongRef", + "description": "A reference to the subject that the contributors contributed to. This may be an activity claim, measurement, or attachment." + }, "role": { "type": "string", "description": "Role or title of the contributor(s).", @@ -24,24 +29,32 @@ }, "description": { "type": "string", - "description": "What the contribution concretely achieved", - "maxLength": 2000, - "maxGraphemes": 500 + "description": "What the contribution concretely entailed. Rich text annotations may be provided via `descriptionFacets`.", + "maxLength": 30000, + "maxGraphemes": 3000 + }, + "descriptionFacets": { + "type": "array", + "description": "Rich text annotations for `description` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } }, "startDate": { "type": "string", "format": "datetime", - "description": "When this contribution started. This should be a subset of the hypercert timeframe." + "description": "The start date and time when this contribution started. This should be a subset of the hypercert timeframe." }, "endDate": { "type": "string", "format": "datetime", - "description": "When this contribution finished. This should be a subset of the hypercert timeframe." + "description": "The end date and time when this contribution finished. This should be a subset of the hypercert timeframe." }, "createdAt": { "type": "string", "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" + "description": "Client-declared timestamp when this record was originally created." } } } diff --git a/lexicons/org/hypercerts/claim/evaluation.json b/lexicons/org/hypercerts/claim/evaluation.json index a6efbc4c..7c3ffccf 100644 --- a/lexicons/org/hypercerts/claim/evaluation.json +++ b/lexicons/org/hypercerts/claim/evaluation.json @@ -27,25 +27,29 @@ "key": "tid", "record": { "type": "object", - "required": ["evaluators", "summary", "createdAt"], + "required": ["contributors", "subject", "createdAt"], "properties": { "subject": { "type": "ref", "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to what is being evaluated. (e.g activity, measurement, contribution, etc.)" + "description": "A reference to the evaluated subject. This may be an activity claim, outcome claim, measurement, attachment, or even another evaluation. An evaluation always refers to only a single evaluated subject (unlike other claim types that may reference multiple subjects)." }, - "evaluators": { + "evaluationDimension": { + "type": "string", + "description": "The aspect/dimension being evaluated, e.g. activityValidity, evidenceQuality, contributionAssessment, or fundingWorthiness.", + "maxLength": 100 + }, + "contributors": { "type": "array", - "description": "DIDs of the evaluators", + "description": "List of contributors to this evaluation with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records.", "items": { "type": "ref", - "ref": "app.certified.defs#did" - }, - "maxLength": 1000 + "ref": "org.hypercerts.defs#weightedContributor" + } }, - "content": { + "inputs": { "type": "array", - "description": "Evaluation data (URIs or blobs) containing detailed reports or methodology", + "description": "Evaluation data containing detailed reports, data, or methodology, that have been used as inputs for the evaluation.", "items": { "type": "union", "refs": [ @@ -57,7 +61,7 @@ }, "measurements": { "type": "array", - "description": "Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement ", + "description": "Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement", "items": { "type": "ref", "ref": "com.atproto.repo.strongRef" @@ -66,24 +70,36 @@ }, "summary": { "type": "string", - "description": "Brief evaluation summary", + "description": "A brief, human-readable summary of the evaluation and its main conclusions. Rich text annotations may be provided via `summaryFacets`.", "maxLength": 5000, "maxGraphemes": 1000 }, + "summaryFacets": { + "type": "array", + "description": "Rich text annotations for `summary` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, "score": { "type": "ref", "ref": "#score", "description": "Optional overall score for this evaluation on a numeric scale." }, - "location": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "An optional reference for georeferenced evaluations. The record referenced must conform with the lexicon app.certified.location." + "locations": { + "type": "array", + "description": "Optional geographic references related to this evaluation. Each referenced record must conform with the app.certified.location lexicon.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "maxLength": 100 }, "createdAt": { "type": "string", "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" + "description": "Client-declared timestamp when this record was originally created." } } } diff --git a/lexicons/org/hypercerts/claim/evidence.json b/lexicons/org/hypercerts/claim/evidence.json deleted file mode 100644 index 03d831a0..00000000 --- a/lexicons/org/hypercerts/claim/evidence.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "lexicon": 1, - "id": "org.hypercerts.claim.evidence", - "defs": { - "main": { - "type": "record", - "description": "A piece of evidence related to a hypercert record (e.g. an activity, project, claim, or evaluation). Evidence may support, clarify, or challenge the referenced subject.", - "key": "tid", - "record": { - "type": "object", - "required": ["content", "title", "createdAt"], - "properties": { - "subject": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to the record this evidence relates to (e.g. an activity, project, claim, or evaluation)." - }, - "content": { - "type": "union", - "refs": [ - "org.hypercerts.defs#uri", - "org.hypercerts.defs#smallBlob" - ], - "description": "A piece of evidence (URI or blob) related to the subject record; it may support, clarify, or challenge a hypercert claim." - }, - "title": { - "type": "string", - "maxLength": 256, - "description": "Title to describe the nature of the evidence." - }, - "shortDescription": { - "type": "string", - "maxLength": 3000, - "maxGraphemes": 300, - "description": "Short description explaining what this evidence shows." - }, - "description": { - "type": "string", - "description": "Longer description describing the evidence in more detail.", - "maxLength": 30000, - "maxGraphemes": 3000 - }, - "relationType": { - "type": "string", - "description": "How this evidence relates to the subject.", - "knownValues": ["supports", "challenges", "clarifies"] - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" - } - } - } - } - } -} diff --git a/lexicons/org/hypercerts/claim/measurement.json b/lexicons/org/hypercerts/claim/measurement.json index 029eecfb..05d4f907 100644 --- a/lexicons/org/hypercerts/claim/measurement.json +++ b/lexicons/org/hypercerts/claim/measurement.json @@ -8,60 +8,99 @@ "key": "tid", "record": { "type": "object", - "required": ["measurers", "metric", "value", "createdAt"], + "required": ["contributors", "metric", "unit", "value", "createdAt"], "properties": { - "subject": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to the record this measurement refers to (e.g. an activity, project, or claim)." - }, - "measurers": { + "subjects": { "type": "array", - "description": "DIDs of the entity (or entities) that measured this data", + "description": "References to the subject(s) the measurement is connected to—this may be an activity claim, outcome claim, evaluation, or even another measurement. This is optional as the measurement can exist before the claim is recorded.", "items": { "type": "ref", - "ref": "app.certified.defs#did" + "ref": "com.atproto.repo.strongRef" }, "maxLength": 100 }, + "contributors": { + "type": "array", + "description": "List of contributors to this measurement with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records.", + "items": { + "type": "ref", + "ref": "org.hypercerts.defs#weightedContributor" + } + }, "metric": { "type": "string", - "description": "The metric being measured", + "description": "The metric being measured, e.g. forest area restored, number of users, etc.", "maxLength": 500 }, + "unit": { + "type": "string", + "description": "The unit of the measured value (e.g. kg CO₂e, hectares, %, index score).", + "maxLength": 50 + }, "value": { "type": "string", - "description": "The measured value", + "description": "The measured numeric value.", "maxLength": 500 }, - "methodType": { + "startDate": { + "type": "string", + "format": "datetime", + "description": "The start date and time when the measurement began." + }, + "endDate": { + "type": "string", + "format": "datetime", + "description": "The end date and time when the measurement ended. If it was a one time measurement, the endDate should be equal to the startDate." + }, + "measurementMethodType": { "type": "string", "description": "Short identifier for the measurement methodology", "maxLength": 30 }, - "methodURI": { + "measurementMethodUri": { "type": "string", "format": "uri", - "description": "URI to methodology documentation, standard protocol, or measurement procedure" + "description": "URI pointing to detailed methodology documentation, a standard protocol, or a measurement procedure." }, - "evidenceURI": { + "resources": { "type": "array", - "description": "URIs to related evidence or underlying data (e.g. org.hypercerts.claim.evidence records or raw datasets)", + "description": "Files, documents, or external references related to the measurement.", "items": { - "type": "string", - "format": "uri" + "type": "union", + "refs": [ + "org.hypercerts.defs#uri", + "org.hypercerts.defs#smallBlob" + ] }, - "maxLength": 50 + "maxLength": 100 + }, + "comment": { + "type": "string", + "description": "Short comment of this measurement, suitable for previews and list views. Rich text annotations may be provided via `commentFacets`.", + "maxLength": 3000, + "maxGraphemes": 300 }, - "location": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to the location where the measurement was taken. The record referenced must conform with the lexicon app.certified.location" + "commentFacets": { + "type": "array", + "description": "Rich text annotations for `comment` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, + "locations": { + "type": "array", + "description": "Optional geographic references related to where the measurement was taken. Each referenced record must conform with the app.certified.location lexicon.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "maxLength": 100 }, "createdAt": { "type": "string", "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" + "description": "Client-declared timestamp when this record was originally created." } } } diff --git a/lexicons/org/hypercerts/claim/outcome.json b/lexicons/org/hypercerts/claim/outcome.json new file mode 100644 index 00000000..14d37a62 --- /dev/null +++ b/lexicons/org/hypercerts/claim/outcome.json @@ -0,0 +1,83 @@ +{ + "lexicon": 1, + "id": "org.hypercerts.claim.outcome", + "defs": { + "main": { + "type": "record", + "description": "An outcome claim describing a valuable goal or observed change. Outcomes can stand alone and be linked to activities later.", + "key": "tid", + "record": { + "type": "object", + "required": ["title", "createdAt"], + "properties": { + "title": { + "type": "string", + "description": "A statement of the goal or observed change.", + "maxLength": 5000, + "maxGraphemes": 1000 + }, + "shortDescription": { + "type": "string", + "description": "Short summary of this outcome claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`.", + "maxLength": 3000, + "maxGraphemes": 300 + }, + "shortDescriptionFacets": { + "type": "array", + "description": "Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, + "description": { + "type": "string", + "description": "Optional longer description of this outcome claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`.", + "maxLength": 30000, + "maxGraphemes": 3000 + }, + "descriptionFacets": { + "type": "array", + "description": "Rich text annotations for `description` (mentions, URLs, hashtags, etc).", + "items": { + "type": "ref", + "ref": "app.bsky.richtext.facet" + } + }, + "relatedActivities": { + "type": "array", + "description": "Optional references to activity claims that may have contributed. Links can be added later as understanding of (causal) relationships develops.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + } + }, + "startDate": { + "type": "string", + "format": "datetime", + "description": "The start date and time when the outcome was observed or is expected." + }, + "endDate": { + "type": "string", + "format": "datetime", + "description": "The end date and time when the outcome was observed or is expected." + }, + "locations": { + "type": "array", + "description": "Optional geographic references related to this outcome. Each referenced record must conform with the app.certified.location lexicon.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "maxLength": 100 + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "Client-declared timestamp when this record was originally created." + } + } + } + } + } +} diff --git a/lexicons/org/hypercerts/claim/project.json b/lexicons/org/hypercerts/claim/project.json index 838d5715..70883b7f 100644 --- a/lexicons/org/hypercerts/claim/project.json +++ b/lexicons/org/hypercerts/claim/project.json @@ -12,7 +12,7 @@ "properties": { "title": { "type": "string", - "description": "Title of this project", + "description": "Title of this project.", "maxLength": 800, "maxGraphemes": 80 }, @@ -33,29 +33,33 @@ "accept": ["image/png", "image/jpeg"], "maxSize": 1000000 }, - "coverPhoto": { + "coverImage": { "type": "blob", - "description": "The cover photo of this project.", + "description": "The cover image of this project.", "accept": ["image/png", "image/jpeg"], "maxSize": 1000000 }, "activities": { "type": "array", - "description": "Array of activities with their associated weights in this project", + "description": "Array of activities with their associated weights in this project.", "items": { "type": "ref", - "ref": "org.hypercerts.claim.activity#activityWeight" + "ref": "org.hypercerts.defs#weightedActivity" } }, - "location": { - "type": "ref", - "ref": "com.atproto.repo.strongRef", - "description": "A strong reference to a location record describing where the work for this project took place. The referenced record must conform to the app.certified.location lexicon." + "locations": { + "type": "array", + "description": "Optional geographic references related to the location of the project. Each referenced record must conform with the app.certified.location lexicon.", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "maxLength": 100 }, "createdAt": { "type": "string", "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" + "description": "Client-declared timestamp when this record was originally created." } } } diff --git a/lexicons/org/hypercerts/claim/rights.json b/lexicons/org/hypercerts/claim/rights.json index 99548b68..48fbd838 100644 --- a/lexicons/org/hypercerts/claim/rights.json +++ b/lexicons/org/hypercerts/claim/rights.json @@ -23,24 +23,30 @@ "rightsType": { "type": "string", "description": "Short rights identifier for easier search", - "maxLength": 10 + "maxLength": 50 }, "rightsDescription": { "type": "string", - "description": "Description of the rights of this hypercert" + "description": "Description of the rights of this hypercert.", + "maxLength": 50000, + "maxGraphemes": 5000 }, - "attachment": { - "type": "union", - "refs": [ - "org.hypercerts.defs#uri", - "org.hypercerts.defs#smallBlob" - ], - "description": "An attachment to define the rights further, e.g. a legal document." + "documents": { + "type": "array", + "description": "The files, documents, or external references to define the rights further, e.g. a legal document.", + "items": { + "type": "union", + "refs": [ + "org.hypercerts.defs#uri", + "org.hypercerts.defs#smallBlob" + ] + }, + "maxLength": 100 }, "createdAt": { "type": "string", "format": "datetime", - "description": "Client-declared timestamp when this record was originally created" + "description": "Client-declared timestamp when this record was originally created." } } } diff --git a/lexicons/org/hypercerts/defs.json b/lexicons/org/hypercerts/defs.json index 24b22e84..6566a700 100644 --- a/lexicons/org/hypercerts/defs.json +++ b/lexicons/org/hypercerts/defs.json @@ -66,6 +66,39 @@ "description": "Image (up to 10MB)" } } + }, + "weightedActivity": { + "type": "object", + "description": "A weighted activity entry, e.g. to add activities to a collection or project.", + "required": ["activity", "weight"], + "properties": { + "activity": { + "type": "ref", + "ref": "com.atproto.repo.strongRef", + "description": "A strong reference to a hypercert activity record. This activity must conform to the lexicon org.hypercerts.claim.activity." + }, + "weight": { + "type": "string", + "description": "The relative weight/importance of this hypercert activity (stored as a string to avoid float precision issues). Weights can be any positive numeric values and do not need to sum to a specific total; normalization can be performed by the consuming application as needed.", + "maxLength": 64 + } + } + }, + "weightedContributor": { + "type": "object", + "description": "A weighted contributor entry, e.g. for attribution on an activity.", + "required": ["contributor"], + "properties": { + "contributor": { + "type": "string", + "description": "The DID, name or pseudonym of the contributor." + }, + "weight": { + "type": "string", + "description": "Relative contribution weight as a decimal string. If omitted, treat as 1.", + "maxLength": 64 + } + } } } }