Files
app/docs/steps/step-05.md
2025-11-08 12:44:39 +00:00

1.6 KiB

File: COMMIT_05_LEXICON.md

Commit 5: ATproto Lexicon Definition

Objective

Define the custom ATproto Lexicon schema for com.ponderants.node. This JSON file is the "Source of Truth" schema, defining the exact data shape that will be published to the user's PDS.

Implementation Specification

1. Create lexicon/com.ponderants.node.json

Create a file at /lexicon/com.ponderants.node.json. This file defines our application's primary data type within the ATproto ecosystem.16

JSON

{
"lexicon": 1,
"id": "com.ponderants.node",
"defs": {
"main": {
"type": "record",
"description": "A Ponderants thought node. It represents a single, captured idea, intended to be linked to other nodes to form a 'thought galaxy'.",
"record": {
"type": "object",
"required": ["createdAt", "title", "body"],
"properties": {
"createdAt": {
"type": "string",
"format": "datetime"
},
"title": {
"type": "string",
"maxLength": 256,
"description": "The title of the thought node."
},
"body": {
"type": "string",
"maxLength": 3000,
"description": "The main content of the thought node, often generated by the AI interviewer."
},
"links": {
"type": "array",
"description": "An array of AT-URIs (as strong refs) pointing to other nodes this node is linked to.",
"items": {
"type": "string",
"format": "at-uri"
},
"maxLength": 50
}
}
}
}
}
}

Test Specification

This commit defines a static schema. It will be implicitly tested by the API in Commit 06, which must successfully publish a record conforming to this exact shape.