{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://humansmd.dev/schema/0.2/humans.schema.json",
  "title": "HUMANS.md profile fields, version 0.2 (draft)",
  "description": "Strict writer schema for contract 0.2-draft.2026-10-13.1. SPEC.md also requires byte bounds, fatal UTF-8, scalar/date checks, filename matching and the YAML subset. Readers reconstruct recognized fields as specified in § 3.10. Voluntary personal and medical notes are allowed.",
  "type": "object",
  "required": [
    "humans",
    "id",
    "name",
    "updated"
  ],
  "additionalProperties": false,
  "properties": {
    "humans": {
      "const": "0.2"
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9-]{2,64}$",
      "description": "Unique within its directory. Equals the basename without .md in every directory, except a file named exactly me.md or an explicitly reported draft validation mode."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "not": {
        "$ref": "#/$defs/unsafeText"
      },
      "description": "Used for resolution only, never served."
    },
    "aliases": {
      "type": "array",
      "maxItems": 5,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40,
        "not": {
          "$ref": "#/$defs/unsafeText"
        }
      },
      "description": "Used for resolution only, never served."
    },
    "identities": {
      "type": "object",
      "description": "Claims, never proof: resolution goes through the organization directory (SPEC § 7).",
      "additionalProperties": false,
      "properties": {
        "email": {
          "type": "string",
          "maxLength": 254,
          "pattern": "^[^\\s@<>]+@[^\\s@<>]+\\.[^\\s@<>]+$"
        },
        "slack": {
          "type": "string",
          "pattern": "^[TE][A-Z0-9]{2,20}/[UW][A-Z0-9]{2,20}$"
        },
        "github": {
          "type": "string",
          "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$"
        },
        "gitlab": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_][A-Za-z0-9_.-]{0,254}$"
        },
        "entra": {
          "type": "string",
          "format": "uuid",
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
        },
        "google": {
          "type": "string",
          "maxLength": 254,
          "pattern": "^[^\\s@<>]+@[^\\s@<>]+\\.[^\\s@<>]+$"
        }
      }
    },
    "languages": {
      "type": "array",
      "maxItems": 10,
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/language"
      }
    },
    "updated": {
      "type": "string",
      "format": "date",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "Gregorian calendar date string, years 0000–9999; quoting recommended. No year-0–99 remapping."
    },
    "visibility": {
      "enum": [
        "org",
        "public",
        "private"
      ],
      "description": "Omission means org for draft compatibility. New-profile compilers should propose explicit private; preserve existing scope unless the owner approves a change. Enforced from trusted context."
    },
    "reading": {
      "$ref": "#/$defs/reading"
    },
    "deciding": {
      "$ref": "#/$defs/deciding"
    },
    "interrupting": {
      "$ref": "#/$defs/interrupting"
    },
    "context": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "$ref": "#/$defs/role"
        },
        "knows_well": {
          "type": "array",
          "maxItems": 15,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/topic"
          }
        },
        "knows_little": {
          "type": "array",
          "maxItems": 15,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/topic"
          }
        },
        "decides": {
          "type": "array",
          "maxItems": 10,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/decision"
          }
        },
        "context_updated": {
          "type": "string",
          "format": "date",
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
        }
      }
    },
    "avoid": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "walls_of_text",
          "filler_intro",
          "filler_outro",
          "hedging",
          "emoji",
          "rhetorical_questions",
          "multiple_asks",
          "unexplained_acronyms",
          "passive_voice",
          "exclamation",
          "long_preamble",
          "nested_bullets",
          "sarcasm"
        ]
      }
    },
    "states": {
      "type": "object",
      "description": "Stored variants only. Inactive in this draft; no caller state selection and no projection or application of overrides (SPEC § 3.7).",
      "additionalProperties": false,
      "properties": {
        "incident": {
          "$ref": "#/$defs/stateOverride"
        },
        "low_bandwidth": {
          "$ref": "#/$defs/stateOverride"
        },
        "focus": {
          "$ref": "#/$defs/stateOverride"
        },
        "mobile": {
          "$ref": "#/$defs/stateOverride"
        }
      }
    },
    "notes": {
      "type": "string",
      "minLength": 1,
      "maxLength": 280,
      "not": {
        "$ref": "#/$defs/unsafeText"
      },
      "description": "Owner-approved preferences or personal information, including voluntary medical statements. Kept as scoped data under SPEC § 6; never an action or task instruction. A sharing warning is not invalidity."
    }
  },
  "$defs": {
    "unsafeText": {
      "description": "Technical plain-text restrictions, Unicode 17.0. No medical word blacklist. Limits count Unicode scalar values.",
      "type": "string",
      "anyOf": [
        {
          "pattern": "[\\p{Cc}\\p{Cf}\\p{Cs}\\p{Co}\\p{Cn}\\p{Zl}\\p{Zp}\\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]"
        },
        {
          "pattern": "[`*_#<>\\[\\]{}|~\\\\]"
        },
        {
          "pattern": "[A-Za-z][A-Za-z0-9+.\\-]*://"
        },
        {
          "pattern": "(^|[^A-Za-z0-9])([Hh][Tt][Tt][Pp][Ss]?|[Mm][Aa][Ii][Ll][Tt][Oo]|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]|[Vv][Bb][Ss][Cc][Rr][Ii][Pp][Tt]|[Dd][Aa][Tt][Aa]|[Ff][Ii][Ll][Ee]|[Ff][Tt][Pp]|[Tt][Ee][Ll]|[Ss][Mm][Ss]|[Ss][Ss][Hh]|[Bb][Ll][Oo][Bb]|[Ww][Ss][Ss]?):"
        },
        {
          "pattern": "(^|[^A-Za-z0-9])[Ww][Ww][Ww]\\."
        },
        {
          "pattern": "[^\\s@]+@[^\\s@]+\\.[^\\s@]+"
        }
      ]
    },
    "reading": {
      "type": "object",
      "description": "What I read.",
      "additionalProperties": false,
      "properties": {
        "lead_with": {
          "enum": [
            "tldr",
            "decision_needed",
            "context",
            "question"
          ],
          "description": "What the first line holds."
        },
        "length": {
          "enum": [
            "minimal",
            "short",
            "standard",
            "thorough"
          ]
        },
        "max_words": {
          "type": "integer",
          "minimum": 20,
          "maximum": 2000,
          "description": "Cap on the entire message, including an appendix, tables and code; never bypass via an unsolicited thread or extra message."
        },
        "structure": {
          "enum": [
            "bullets",
            "prose",
            "mixed"
          ]
        },
        "visual": {
          "type": "array",
          "items": {
            "enum": [
              "table",
              "diagram",
              "chart",
              "example",
              "text"
            ]
          },
          "uniqueItems": true,
          "maxItems": 5,
          "description": "Preferred forms, most wanted first."
        },
        "technical_depth": {
          "enum": [
            "non_technical",
            "balanced",
            "expert"
          ]
        },
        "jargon": {
          "enum": [
            "avoid",
            "define",
            "ok"
          ]
        },
        "tone": {
          "enum": [
            "direct",
            "neutral",
            "warm"
          ]
        },
        "evidence": {
          "enum": [
            "numbers_and_sources",
            "key_numbers",
            "light"
          ]
        },
        "uncertainty": {
          "enum": [
            "flag_explicitly",
            "inline"
          ],
          "description": "flag_explicitly: say what was checked and what was assumed."
        }
      }
    },
    "deciding": {
      "type": "object",
      "description": "What I decide.",
      "additionalProperties": false,
      "properties": {
        "reversible": {
          "enum": [
            "decide_and_report",
            "ask"
          ],
          "description": "Only for actions the agent is already allowed to take. Never grants a permission."
        },
        "batch_questions": {
          "enum": [
            "end_of_task",
            "as_they_come"
          ]
        },
        "default_answer": {
          "enum": [
            "always",
            "when_obvious"
          ]
        },
        "asks_per_message": {
          "enum": [
            "one",
            "few",
            "any"
          ]
        },
        "format": {
          "enum": [
            "recommendation_first",
            "options_then_recommendation",
            "options_only"
          ]
        },
        "challenge": {
          "enum": [
            "welcome_early",
            "after_draft",
            "on_request"
          ]
        },
        "out_of_scope_steps": {
          "enum": [
            "omit_unless_blocking",
            "list"
          ]
        }
      }
    },
    "interrupting": {
      "type": "object",
      "description": "When to interrupt me.",
      "additionalProperties": false,
      "properties": {
        "interrupt_for": {
          "enum": [
            "blocking_only",
            "blocking_or_risky",
            "anything"
          ]
        },
        "group_by": {
          "enum": [
            "project",
            "none"
          ]
        },
        "when_focused": {
          "enum": [
            "summary_later",
            "urgent_only",
            "as_usual"
          ],
          "description": "Stored but inactive; omitted from projections and group merges."
        },
        "channel_hint": {
          "enum": [
            "async_written",
            "sync_call",
            "either"
          ]
        }
      }
    },
    "stateOverride": {
      "type": "object",
      "description": "Stored partial preference variant using bare names. Inactive in this draft.",
      "additionalProperties": false,
      "properties": {
        "lead_with": {
          "enum": [
            "tldr",
            "decision_needed",
            "context",
            "question"
          ],
          "description": "What the first line holds."
        },
        "length": {
          "enum": [
            "minimal",
            "short",
            "standard",
            "thorough"
          ]
        },
        "max_words": {
          "type": "integer",
          "minimum": 20,
          "maximum": 2000,
          "description": "Cap on the entire message, including an appendix, tables and code; never bypass via an unsolicited thread or extra message."
        },
        "structure": {
          "enum": [
            "bullets",
            "prose",
            "mixed"
          ]
        },
        "visual": {
          "type": "array",
          "items": {
            "enum": [
              "table",
              "diagram",
              "chart",
              "example",
              "text"
            ]
          },
          "uniqueItems": true,
          "maxItems": 5,
          "description": "Preferred forms, most wanted first."
        },
        "technical_depth": {
          "enum": [
            "non_technical",
            "balanced",
            "expert"
          ]
        },
        "jargon": {
          "enum": [
            "avoid",
            "define",
            "ok"
          ]
        },
        "tone": {
          "enum": [
            "direct",
            "neutral",
            "warm"
          ]
        },
        "evidence": {
          "enum": [
            "numbers_and_sources",
            "key_numbers",
            "light"
          ]
        },
        "uncertainty": {
          "enum": [
            "flag_explicitly",
            "inline"
          ],
          "description": "flag_explicitly: say what was checked and what was assumed."
        },
        "reversible": {
          "enum": [
            "decide_and_report",
            "ask"
          ],
          "description": "Only for actions the agent is already allowed to take. Never grants a permission."
        },
        "batch_questions": {
          "enum": [
            "end_of_task",
            "as_they_come"
          ]
        },
        "default_answer": {
          "enum": [
            "always",
            "when_obvious"
          ]
        },
        "asks_per_message": {
          "enum": [
            "one",
            "few",
            "any"
          ]
        },
        "format": {
          "enum": [
            "recommendation_first",
            "options_then_recommendation",
            "options_only"
          ]
        },
        "challenge": {
          "enum": [
            "welcome_early",
            "after_draft",
            "on_request"
          ]
        },
        "out_of_scope_steps": {
          "enum": [
            "omit_unless_blocking",
            "list"
          ]
        },
        "interrupt_for": {
          "enum": [
            "blocking_only",
            "blocking_or_risky",
            "anything"
          ]
        },
        "group_by": {
          "enum": [
            "project",
            "none"
          ]
        },
        "when_focused": {
          "enum": [
            "summary_later",
            "urgent_only",
            "as_usual"
          ]
        },
        "channel_hint": {
          "enum": [
            "async_written",
            "sync_call",
            "either"
          ]
        }
      }
    },
    "role": {
      "enum": [
        "software-engineer",
        "senior-engineer",
        "staff-engineer",
        "principal-engineer",
        "tech-lead",
        "architect",
        "engineering-manager",
        "director-of-engineering",
        "vp-engineering",
        "cto",
        "sre",
        "devops-engineer",
        "security-engineer",
        "qa-engineer",
        "data-engineer",
        "data-scientist",
        "ml-engineer",
        "product-manager",
        "product-owner",
        "designer",
        "ux-researcher",
        "technical-writer",
        "founder",
        "ceo",
        "coo",
        "cfo",
        "operations",
        "marketing",
        "sales",
        "customer-support",
        "legal",
        "finance",
        "people-ops",
        "researcher",
        "student"
      ]
    },
    "topic": {
      "enum": [
        "javascript",
        "typescript",
        "python",
        "php",
        "ruby",
        "go",
        "rust",
        "java",
        "kotlin",
        "swift",
        "c-cpp",
        "csharp-dotnet",
        "elixir",
        "scala",
        "sql",
        "shell",
        "react",
        "vue",
        "svelte",
        "angular",
        "node",
        "symfony",
        "laravel",
        "rails",
        "django",
        "spring",
        "frontend",
        "backend",
        "mobile",
        "apis",
        "distributed-systems",
        "databases",
        "postgres",
        "mysql",
        "mongodb",
        "redis",
        "search",
        "caching",
        "messaging",
        "data-pipelines",
        "analytics",
        "machine-learning",
        "llm-agents",
        "infrastructure",
        "kubernetes",
        "docker",
        "terraform",
        "ci-cd",
        "observability",
        "incident-response",
        "performance",
        "security",
        "identity-auth",
        "networking",
        "cloud-aws",
        "cloud-gcp",
        "cloud-azure",
        "cloudflare",
        "cloud-costs",
        "testing",
        "accessibility",
        "design-systems",
        "ux-research",
        "product-strategy",
        "roadmap",
        "pricing",
        "billing-payments",
        "growth",
        "seo",
        "marketing",
        "sales",
        "customer-support",
        "compliance",
        "privacy-gdpr",
        "legal",
        "finance",
        "hiring",
        "people-management",
        "project-management",
        "documentation",
        "open-source"
      ]
    },
    "decision": {
      "enum": [
        "architecture",
        "schema-changes",
        "api-contracts",
        "dependencies",
        "infra-budget",
        "vendor-choice",
        "security-exceptions",
        "data-access",
        "release-scope",
        "release-timing",
        "roadmap-priority",
        "pricing",
        "design",
        "copy-and-content",
        "hiring",
        "team-organization",
        "incident-escalation",
        "legal-review",
        "spending"
      ]
    },
    "language": {
      "enum": [
        "aa",
        "ab",
        "ae",
        "af",
        "ak",
        "am",
        "an",
        "ar",
        "as",
        "av",
        "ay",
        "az",
        "ba",
        "be",
        "bg",
        "bi",
        "bm",
        "bn",
        "bo",
        "br",
        "bs",
        "ca",
        "ce",
        "ch",
        "co",
        "cr",
        "cs",
        "cu",
        "cv",
        "cy",
        "da",
        "de",
        "dv",
        "dz",
        "ee",
        "el",
        "en",
        "eo",
        "es",
        "et",
        "eu",
        "fa",
        "ff",
        "fi",
        "fj",
        "fo",
        "fr",
        "fy",
        "ga",
        "gd",
        "gl",
        "gn",
        "gu",
        "gv",
        "ha",
        "he",
        "hi",
        "ho",
        "hr",
        "ht",
        "hu",
        "hy",
        "hz",
        "ia",
        "id",
        "ie",
        "ig",
        "ii",
        "ik",
        "io",
        "is",
        "it",
        "iu",
        "ja",
        "jv",
        "ka",
        "kg",
        "ki",
        "kj",
        "kk",
        "kl",
        "km",
        "kn",
        "ko",
        "kr",
        "ks",
        "ku",
        "kv",
        "kw",
        "ky",
        "la",
        "lb",
        "lg",
        "li",
        "ln",
        "lo",
        "lt",
        "lu",
        "lv",
        "mg",
        "mh",
        "mi",
        "mk",
        "ml",
        "mn",
        "mr",
        "ms",
        "mt",
        "my",
        "na",
        "nb",
        "nd",
        "ne",
        "ng",
        "nl",
        "nn",
        "no",
        "nr",
        "nv",
        "ny",
        "oc",
        "oj",
        "om",
        "or",
        "os",
        "pa",
        "pi",
        "pl",
        "ps",
        "pt",
        "qu",
        "rm",
        "rn",
        "ro",
        "ru",
        "rw",
        "sa",
        "sc",
        "sd",
        "se",
        "sg",
        "si",
        "sk",
        "sl",
        "sm",
        "sn",
        "so",
        "sq",
        "sr",
        "ss",
        "st",
        "su",
        "sv",
        "sw",
        "ta",
        "te",
        "tg",
        "th",
        "ti",
        "tk",
        "tl",
        "tn",
        "to",
        "tr",
        "ts",
        "tt",
        "tw",
        "ty",
        "ug",
        "uk",
        "ur",
        "uz",
        "ve",
        "vi",
        "vo",
        "wa",
        "wo",
        "xh",
        "yi",
        "yo",
        "za",
        "zh",
        "zu"
      ],
      "description": "ISO 639-1 code."
    }
  }
}
