Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sparkly-doors-bet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hypercerts-org/lexicon": minor
---

Add support for multiple locations in an activity claim.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
4 changes: 2 additions & 2 deletions ERD.puml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dataclass activity <<largeBold>> #B4E5D0 {
startDate
endDate
contributions[]?
location?
locations[]?
rights?
project?
createdAt
Expand Down Expand Up @@ -304,7 +304,7 @@ project::location --> location

activity::contributions -l--> contribution
activity::rights --> rights
activity::location --> location
activity::locations --> location
activity::project --> project

contribution::contributors --> contributor : made by
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,20 +286,20 @@ 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 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` |
| `locations` | `ref` | ❌ | An array of strong references to the locations where the work for done hypercert was located | References must conform to `app.certified.location` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat lexicons/org/hypercerts/claim/activity.json | jq '.defs.main.record.properties.locations'

Repository: hypercerts-org/hypercerts-lexicon

Length of output: 347


Type column should be array, not ref, and the description must match the actual JSON schema.

The Type column currently shows ref, but the JSON schema defines locations as type: "array" with items of type ref. Additionally, the description in README doesn't match the actual schema. The schema states: "An array of strong references to the location where activity was performed. The record referenced must conform with the lexicon app.certified.location."

Proposed fix
-| `locations`        | `ref`    | ❌       | An array of strong references to the locations where the work for done hypercert was located | References must conform to `app.certified.location`                       |
+| `locations`        | `array`  | ❌       | An array of strong references to the location where activity was performed. The record referenced must conform with the lexicon app.certified.location. |                                                                             |
🤖 Prompt for AI Agents
In @README.md at line 300, Update the documentation row for the `locations`
field: change the Type column from `ref` to `array`, and replace the current
description with the schema-accurate text such as "An array of strong references
to the location where activity was performed. The record referenced must conform
with the lexicon app.certified.location." Ensure the README entry for
`locations` matches the JSON schema semantics (array of refs) and the references
constraint.

| `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 | |

#### Defs

Expand Down
Binary file removed bun.lockb
Binary file not shown.
11 changes: 7 additions & 4 deletions lexicons/org/hypercerts/claim/activity.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@
"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."
"locations": {
"type": "array",
"description": "An array of strong references to the location where activity was performed. The record referenced must conform with the lexicon app.certified.location.",
"items": {
"type": "ref",
"ref": "com.atproto.repo.strongRef"
}
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"project": {
"type": "string",
Expand Down