doc-atoms-composition-v1

draft 1.0.0 json-schema
idschema-atoms/json-schema/doc-atoms-composition-v1
created2026-05-26

doc-atoms-composition-v1.json json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://doc-atoms.com/schemas/composition-v1.json",
  "title": "doc-atoms v1 composition",
  "description": "A document composition — an assembled artifact (a learning path, a runbook collection, a multi-part reference guide) that references multiple doc-atoms.",
  "type": "object",
  "required": ["schema", "type", "id", "version", "name", "references"],
  "additionalProperties": false,
  "properties": {
    "schema": {
      "type": "string",
      "const": "https://doc-atoms.com/schemas/composition-v1.json"
    },
    "type": { "type": "string", "const": "document" },
    "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$" },
    "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[A-Za-z0-9.-]+)?$" },
    "name": { "type": "string", "minLength": 1, "maxLength": 120 },
    "summary": { "type": "string", "maxLength": 500 },
    "audience": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
    "tags": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 40 }, "uniqueItems": true },
    "references": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tutorials":        { "type": "array", "items": { "$ref": "#/$defs/ref" }, "uniqueItems": true },
        "explanations":     { "type": "array", "items": { "$ref": "#/$defs/ref" }, "uniqueItems": true },
        "runbooks":         { "type": "array", "items": { "$ref": "#/$defs/ref" }, "uniqueItems": true },
        "how_tos":          { "type": "array", "items": { "$ref": "#/$defs/ref" }, "uniqueItems": true },
        "reference_guides": { "type": "array", "items": { "$ref": "#/$defs/ref" }, "uniqueItems": true }
      }
    }
  },
  "$defs": {
    "ref": {
      "type": "object",
      "required": ["ref", "version"],
      "additionalProperties": false,
      "properties": {
        "ref":     { "type": "string", "pattern": "^doc-atoms://atoms/[a-z-]+/[a-z0-9-]+$" },
        "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[A-Za-z0-9.-]+)?$" }
      }
    }
  }
}

atom.toml
id          = "schema-atoms/json-schema/doc-atoms-composition-v1"
version     = "1.0.0"
content_hash = ""
lifecycle   = "draft"
created_at  = "2026-05-26T00:00:00Z"

[spec]
class          = "json-schema"
schema_version = "2020-12"
root_schema_id = "https://doc-atoms.com/schemas/composition-v1.json"
asset          = "doc-atoms-composition-v1.json"

[protocol]
provenance = "https://github.com/convergent-systems-co/doc-atoms/blob/main/schemas/composition-v1.json"
license    = "Apache-2.0"