Add provenance schema contract for v0.3.0
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://thinkloom.app/schemas/provenance/1.0/idea-revision.schema.json",
|
||||
"title": "Idea revision",
|
||||
"description": "Immutable content revision for one idea.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"revision_id": {
|
||||
"type": "string",
|
||||
"pattern": "^revision_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"idea_id": {
|
||||
"type": "string",
|
||||
"pattern": "^idea_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"revision_number": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"detail": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"source_turn_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^turn_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"parent_idea_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^idea_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"created_by": {
|
||||
"enum": [
|
||||
"user",
|
||||
"assistant",
|
||||
"mixed"
|
||||
]
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
||||
},
|
||||
"content_sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^sha256:[a-f0-9]{64}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"revision_id",
|
||||
"idea_id",
|
||||
"revision_number",
|
||||
"title",
|
||||
"summary",
|
||||
"detail",
|
||||
"tags",
|
||||
"source_turn_ids",
|
||||
"parent_idea_ids",
|
||||
"created_by",
|
||||
"created_at",
|
||||
"content_sha256"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"examples": [
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"revision_id": "revision_01J0000000000000000000000A",
|
||||
"idea_id": "idea_01J00000000000000000000009",
|
||||
"revision_number": 1,
|
||||
"title": "Attention as civic infrastructure",
|
||||
"summary": "Institutions influence shared attention.",
|
||||
"detail": "Treat attention as a public condition.",
|
||||
"tags": [
|
||||
"thesis"
|
||||
],
|
||||
"source_turn_ids": [
|
||||
"turn_01J00000000000000000000007"
|
||||
],
|
||||
"parent_idea_ids": [],
|
||||
"created_by": "mixed",
|
||||
"created_at": "2026-07-17T18:42:10.123Z",
|
||||
"content_sha256": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user