# ink.branchline.bud

> Published by [branchline.ink](https://lexicon.garden/identity/did:plc:brvu7akhdvsqcomb67pafw25)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.bud)
- [Documentation](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.bud/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.bud/examples)

## Definitions

### `ink.branchline.bud`

**Type**: `record`

A bud: one contribution to a story tree. Freshly written buds grow for 24h (not yet followable); after that they open as 'blooms' that other writers can extend; past 48h without children they lock into 'branches'. These lifecycle stages are views of the same record, not different record types. The AppView enforces a 500-word ceiling on `text` (counted via Unicode word segmentation); writes that exceed it are rejected as WordLimitExceeded.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `text` | `string` | Yes |  |
| `title` | `string` | Yes |  |
| `parent` | `ref` → `com.atproto.repo.strongRef` | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `formatting` | `array` | No |  |

### `ink.branchline.bud#formatSpan`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `end` | `integer` | Yes | Byte offset (exclusive) into `text` where the span ends. |
| `type` | `string` | Yes |  |
| `start` | `integer` | Yes | Byte offset (inclusive) into `text` where the span begins. |

## Raw Schema

```json
{
  "id": "ink.branchline.bud",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "title",
          "text",
          "createdAt"
        ],
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 20000,
            "maxGraphemes": 10000
          },
          "title": {
            "type": "string",
            "maxLength": 1200,
            "maxGraphemes": 120
          },
          "parent": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "formatting": {
            "type": "array",
            "items": {
              "ref": "#formatSpan",
              "type": "ref"
            }
          }
        }
      },
      "description": "A bud: one contribution to a story tree. Freshly written buds grow for 24h (not yet followable); after that they open as 'blooms' that other writers can extend; past 48h without children they lock into 'branches'. These lifecycle stages are views of the same record, not different record types. The AppView enforces a 500-word ceiling on `text` (counted via Unicode word segmentation); writes that exceed it are rejected as WordLimitExceeded."
    },
    "formatSpan": {
      "type": "object",
      "required": [
        "start",
        "end",
        "type"
      ],
      "properties": {
        "end": {
          "type": "integer",
          "minimum": 0,
          "description": "Byte offset (exclusive) into `text` where the span ends."
        },
        "type": {
          "type": "string",
          "knownValues": [
            "bold",
            "italic",
            "underline",
            "strikethrough"
          ]
        },
        "start": {
          "type": "integer",
          "minimum": 0,
          "description": "Byte offset (inclusive) into `text` where the span begins."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
