# ch.openlegal.annotation

> Published by [martingajdos.ch](https://lexicon.garden/identity/did:plc:63agxubxktwdumdrwhegyk2h)

✓ This is the authoritative definition for this NSID.

## Description

An annotation of a legal document, modelled on the W3C Web Annotation Data Model (dokieli-flavoured) and expressed as an AT Protocol record. The creator is the record's repo (DID); collaboration is per-repo (each annotator holds their own records, aggregated by an AppView). Composes app.bsky.richtext + app.bsky.embed rather than forking them.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:63agxubxktwdumdrwhegyk2h/ch.openlegal.annotation)
- [Documentation](https://lexicon.garden/lexicon/did:plc:63agxubxktwdumdrwhegyk2h/ch.openlegal.annotation/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:63agxubxktwdumdrwhegyk2h/ch.openlegal.annotation/examples)

## Definitions

### `ch.openlegal.annotation`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `body` | `union` | No | The annotation content (WADM body): inline text (with richtext), or an embedded external/record resource. Absent for a bare highlight. |
| `reply` | `ref` → `com.atproto.repo.strongRef` | No | For threaded annotations: the parent ch.openlegal.annotation being replied to (WADM replying / AS2 inReplyTo). |
| `target` | `ref` → `ch.openlegal.defs#target` | Yes | What is being annotated (WADM target — source + selector + version). |
| `createdAt` | `string` (datetime) | Yes | When the annotation was created (WADM created). |
| `motivation` | `string` | Yes | Why the annotation exists (WADM motivation). |

## Raw Schema

```json
{
  "id": "ch.openlegal.annotation",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "target",
          "motivation",
          "createdAt"
        ],
        "properties": {
          "body": {
            "refs": [
              "ch.openlegal.defs#textBody",
              "app.bsky.embed.external",
              "app.bsky.embed.record"
            ],
            "type": "union",
            "closed": false,
            "description": "The annotation content (WADM body): inline text (with richtext), or an embedded external/record resource. Absent for a bare highlight."
          },
          "reply": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "For threaded annotations: the parent ch.openlegal.annotation being replied to (WADM replying / AS2 inReplyTo)."
          },
          "target": {
            "ref": "ch.openlegal.defs#target",
            "type": "ref",
            "description": "What is being annotated (WADM target — source + selector + version)."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the annotation was created (WADM created)."
          },
          "motivation": {
            "type": "string",
            "description": "Why the annotation exists (WADM motivation).",
            "knownValues": [
              "commenting",
              "highlighting",
              "describing",
              "classifying",
              "linking",
              "editing",
              "assessing",
              "questioning",
              "replying"
            ]
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "An annotation of a legal document, modelled on the W3C Web Annotation Data Model (dokieli-flavoured) and expressed as an AT Protocol record. The creator is the record's repo (DID); collaboration is per-repo (each annotator holds their own records, aggregated by an AppView). Composes app.bsky.richtext + app.bsky.embed rather than forking them."
}
```
