spec-driven-docs 0.5.0

Spec-driven documentation: current specs, immutable decision records, and executable gates kept coherent for people and coding agents.
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/gubasso/spec-driven-docs/blob/main/instance/manifest.schema.json",
  "type": "object",
  "required": [
    "schema_version",
    "canon_version",
    "canon_source",
    "profile",
    "docs_root",
    "installed_at",
    "managed_files",
    "adopted_files",
    "integration_blocks"
  ],
  "properties": {
    "schema_version": { "const": 3 },
    "canon_version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "canon_source": { "type": "string", "minLength": 1 },
    "profile": { "enum": ["codebase", "knowledge-base"] },
    "docs_root": { "enum": ["docs", "_docs"] },
    "installed_at": { "type": "string", "format": "date-time" },
    "plan_zone": { "$ref": "#/$defs/plan_zone" },
    "docs_scratch": { "$ref": "#/$defs/relative_path" },
    "managed_files": { "$ref": "#/$defs/managed" },
    "adopted_files": { "$ref": "#/$defs/adopted" },
    "integration_blocks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["path", "marker_hash"],
        "properties": {
          "path": { "type": "string" },
          "marker_hash": { "$ref": "#/$defs/hash" }
        },
        "additionalProperties": false
      }
    }
  },
  "$defs": {
    "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "relative_path": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[^/]",
      "not": { "pattern": "^[.\\s/]*$" }
    },
    "confined_path": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[^/]",
      "allOf": [
        { "not": { "pattern": "(^|/)\\.\\.(/|$)" } },
        { "not": { "pattern": "^[.\\s/]*$" } }
      ]
    },
    "plan_zone": {
      "type": "object",
      "oneOf": [
        {
          "required": ["kind", "path"],
          "properties": {
            "kind": { "enum": ["tracked", "untracked"] },
            "path": { "$ref": "#/$defs/confined_path" }
          },
          "additionalProperties": false
        },
        {
          "required": ["kind"],
          "properties": { "kind": { "enum": ["env", "none"] } },
          "additionalProperties": false
        }
      ]
    },
    "managed": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["source", "destination", "sha256"],
        "properties": {
          "source": { "type": "string" },
          "destination": { "type": "string" },
          "sha256": { "$ref": "#/$defs/hash" }
        },
        "additionalProperties": false
      }
    },
    "adopted": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["source", "destination", "sha256", "baseline_sha256"],
        "properties": {
          "source": { "type": "string" },
          "destination": { "type": "string" },
          "sha256": { "$ref": "#/$defs/hash" },
          "baseline_sha256": { "$ref": "#/$defs/hash" }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}