{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://studybrave.com/schemas/self-map/0.1.0.json",
  "title": "Self Map",
  "description": "Artifact produced by P-001. A recorded self-model, evidence-tiered.",
  "type": "object",
  "required": [
    "artifact",
    "protocol",
    "version",
    "record",
    "attention",
    "capabilities",
    "drives",
    "constraints",
    "contradictions",
    "unknowns"
  ],
  "additionalProperties": false,
  "properties": {
    "artifact": {
      "const": "self-map"
    },
    "protocol": {
      "const": "P-001"
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "completed_at": {
      "type": "string",
      "description": "ISO 8601 date the interview was completed. Supplied by the runtime, not the model."
    },
    "adversary_mode": {
      "type": "boolean",
      "default": false
    },
    "record": {
      "type": "object",
      "required": [
        "finished",
        "abandoned"
      ],
      "additionalProperties": false,
      "properties": {
        "finished": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "what",
              "when",
              "duration_actual"
            ],
            "additionalProperties": false,
            "properties": {
              "what": {
                "type": "string"
              },
              "when": {
                "type": "string",
                "description": "Approximate; e.g. '2025-Q3' or 'March 2026'"
              },
              "duration_actual": {
                "type": "string"
              },
              "affected_others": {
                "type": "string"
              },
              "notes": {
                "type": "string"
              }
            }
          }
        },
        "abandoned": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "what",
              "when",
              "stopped_at"
            ],
            "additionalProperties": false,
            "properties": {
              "what": {
                "type": "string"
              },
              "when": {
                "type": "string"
              },
              "stopped_at": {
                "type": "string",
                "enum": [
                  "beginning",
                  "early-middle",
                  "middle",
                  "late-middle",
                  "final-stretch"
                ],
                "description": "Where in the arc it stopped. The signature lives here."
              },
              "stated_reason": {
                "type": "string"
              },
              "notes": {
                "type": "string"
              }
            }
          }
        },
        "finished_count_note": {
          "type": "string",
          "description": "Recorded when fewer than five finished items were produced, with what consumed the time instead."
        }
      }
    },
    "attention": {
      "type": "object",
      "required": [
        "windows"
      ],
      "additionalProperties": false,
      "properties": {
        "windows": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "when",
              "evidence",
              "quality"
            ],
            "additionalProperties": false,
            "properties": {
              "when": {
                "type": "string",
                "description": "Specific: days and hours"
              },
              "evidence": {
                "type": "string",
                "description": "What in the calendar supports this"
              },
              "quality": {
                "type": "string",
                "enum": [
                  "deep",
                  "moderate",
                  "shallow"
                ]
              }
            }
          }
        },
        "phantom_windows": {
          "type": "array",
          "description": "Hours believed to be productive that the calendar contradicts.",
          "items": {
            "type": "object",
            "required": [
              "believed",
              "actual"
            ],
            "additionalProperties": false,
            "properties": {
              "believed": {
                "type": "string"
              },
              "actual": {
                "type": "string"
              }
            }
          }
        },
        "longest_real_block": {
          "type": "string",
          "description": "Longest uninterrupted block actually had in a typical week."
        }
      }
    },
    "capabilities": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "name",
          "tier"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "tier": {
            "type": "string",
            "enum": [
              "demonstrated",
              "practised",
              "studied",
              "claimed"
            ],
            "description": "Assigned by the agent from the strongest instance offered, never self-assigned."
          },
          "strongest_instance": {
            "type": "string"
          },
          "instance_date": {
            "type": "string"
          },
          "visible_to_others": {
            "type": "boolean"
          }
        }
      }
    },
    "assumed_but_absent": {
      "type": "array",
      "description": "Capabilities others assume they have and they do not.",
      "items": {
        "type": "string"
      }
    },
    "held_but_unseen": {
      "type": "array",
      "description": "Capabilities held that no one around them knows about.",
      "items": {
        "type": "string"
      }
    },
    "drives": {
      "type": "object",
      "required": [
        "inferred",
        "aversions"
      ],
      "additionalProperties": false,
      "properties": {
        "inferred": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "drive",
              "basis"
            ],
            "additionalProperties": false,
            "properties": {
              "drive": {
                "type": "string"
              },
              "basis": {
                "type": "string",
                "description": "The behavioural evidence it was inferred from"
              },
              "contested": {
                "type": "boolean",
                "description": "True if the subject argued against it"
              }
            }
          }
        },
        "aversions": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "aversion",
              "basis"
            ],
            "additionalProperties": false,
            "properties": {
              "aversion": {
                "type": "string"
              },
              "basis": {
                "type": "string"
              }
            }
          }
        },
        "abandonment_signature": {
          "type": "string",
          "description": "The consistent point at which things stop, if one exists."
        },
        "voluntary_unpaid": {
          "type": "array",
          "description": "Done at cost, with no external reward. Usually the truest signal present.",
          "items": {
            "type": "string"
          }
        },
        "wanted_but_avoided": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "constraints": {
      "type": "object",
      "required": [
        "hours_per_week"
      ],
      "additionalProperties": false,
      "properties": {
        "hours_per_week": {
          "type": "number",
          "minimum": 0
        },
        "hours_distribution": {
          "type": "string"
        },
        "financial_floor": {
          "type": "string"
        },
        "obligations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "health_and_energy": {
          "type": "string"
        },
        "geographic_or_legal": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "contradictions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "claim",
          "record_says",
          "resolution"
        ],
        "additionalProperties": false,
        "properties": {
          "claim": {
            "type": "string"
          },
          "record_says": {
            "type": "string"
          },
          "resolution": {
            "type": "string",
            "description": "The subject's answer, verbatim"
          },
          "resolution_supported": {
            "type": "boolean"
          }
        }
      }
    },
    "unknowns": {
      "type": "array",
      "minItems": 1,
      "description": "Regions of the map that were not surveyed. A map with none of these was drawn, not surveyed.",
      "items": {
        "type": "string"
      }
    },
    "summary": {
      "type": "string",
      "description": "One paragraph, plain, no encouragement."
    }
  }
}
