SystemStatus - JSON Schemas

SystemStatus — JSON Schemas (Phase 1)

References: SystemStatus-PRD, SystemStatus - Concept & Features. Schemas are draft-07 style; adjust as needed in implementation.

Character (simplified for Phase 1)

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://systemrpg.app/schema/character.json",
  "type": "object",
  "required": ["id", "workspaceId", "ownerUserId", "name", "stats", "derived", "skills", "progressionWallet", "paths"],
  "properties": {
    "id": { "type": "string" },
    "workspaceId": { "type": "string" },
    "ownerUserId": { "type": "string" },
    "name": { "type": "string", "minLength": 1 },
    "speciesId": { "type": "string" },
    "originId": { "type": "string" },
    "paradigm": {
      "type": "object",
      "properties": {
        "focus": { "enum": ["Physical", "Mental", "Balanced"] },
        "role": { "enum": ["Action", "Defense", "Support"] }
      },
      "required": ["focus", "role"]
    },
    "stats": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "vitality": { "$ref": "#/definitions/stat" },
        "endurance": { "$ref": "#/definitions/stat" },
        "strength": { "$ref": "#/definitions/stat" },
        "agility": { "$ref": "#/definitions/stat" },
        "perception": { "$ref": "#/definitions/stat" },
        "reaction": { "$ref": "#/definitions/stat" },
        "resistance": { "$ref": "#/definitions/stat" },
        "willpower": { "$ref": "#/definitions/stat" },
        "intelligence": { "$ref": "#/definitions/stat" },
        "wisdom": { "$ref": "#/definitions/stat" },
        "control": { "$ref": "#/definitions/stat" },
        "focus": { "$ref": "#/definitions/stat" },
        "spiritual": {
          "type": "object",
          "description": "Optional spiritual stats; may be hidden by visibility until unlocked",
          "additionalProperties": false,
          "properties": {
            "faith": { "$ref": "#/definitions/stat" },
            "fortitude": { "$ref": "#/definitions/stat" },
            "devotion": { "$ref": "#/definitions/stat" },
            "zeal": { "$ref": "#/definitions/stat" },
            "mercy": { "$ref": "#/definitions/stat" },
            "luck": { "$ref": "#/definitions/stat" }
          }
        }
      }
    },
    "derived": {
      "type": "object",
      "properties": {
        "hp": { "$ref": "#/definitions/derivedResource" },
        "mp": { "$ref": "#/definitions/derivedResource" },
        "sp": { "$ref": "#/definitions/derivedResource" },
        "pAtk": { "$ref": "#/definitions/baseBonus" },
        "mAtk": { "$ref": "#/definitions/baseBonus" },
        "pDef": { "$ref": "#/definitions/baseBonus" },
        "mDef": { "$ref": "#/definitions/baseBonus" },
        "walkSpeed": { "$ref": "#/definitions/baseBonus" },
        "initiative": { "$ref": "#/definitions/baseBonus" }
      },
      "required": ["hp", "pAtk", "pDef", "walkSpeed", "initiative"]
    },
    "skills": {
      "type": "array",
      "items": { "$ref": "https://systemrpg.app/schema/character-skill.json" }
    },
    "progressionWallet": { "$ref": "#/definitions/wallet" },
    "paths": {
      "type": "array",
      "items": { "$ref": "https://systemrpg.app/schema/character-path.json" }
    },
    "visibilityMap": { "type": "object" },
    "notes": { "type": "string" },
    "createdAt": { "type": "string", "format": "date-time" },
    "updatedAt": { "type": "string", "format": "date-time" }
  },
  "definitions": {
    "stat": {
      "type": "object",
      "properties": { "base": { "type": "integer" }, "bonus": { "type": "integer" } },
      "required": ["base", "bonus"]
    },
    "baseBonus": {
      "type": "object",
      "properties": { "base": { "type": "integer" }, "bonus": { "type": "integer" } },
      "required": ["base", "bonus"]
    },
    "derivedResource": {
      "type": "object",
      "properties": {
        "maxBase": { "type": "integer" },
        "maxBonus": { "type": "integer" },
        "regenPerHourBase": { "type": "integer" },
        "regenBonus": { "type": "integer" },
        "current": { "type": "integer" }
      },
      "required": ["maxBase", "maxBonus", "regenPerHourBase", "regenBonus", "current"]
    },
    "wallet": {
      "type": "object",
      "properties": { "pp": { "type": "integer", "minimum": 0 } },
      "required": ["pp"]
    }
  }
}

Character Skill Entry

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://systemrpg.app/schema/character-skill.json",
  "type": "object",
  "required": ["id", "name", "rarity", "level", "xp"],
  "properties": {
    "id": { "type": "string" },
    "name": { "type": "string" },
    "rarity": { "type": "integer", "minimum": 1, "maximum": 5 },
    "level": { "type": "integer", "minimum": 0 },
    "xp": { "type": "integer", "minimum": 0 },
    "xpToNext": { "type": "integer", "minimum": 0 },
    "powerLevel": { "type": "integer", "minimum": 0 }
  }
}

Character Path Entry

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://systemrpg.app/schema/character-path.json",
  "type": "object",
  "required": ["id", "name", "level"],
  "properties": {
    "id": { "type": "string" },
    "name": { "type": "string" },
    "level": { "type": "integer", "minimum": 0 },
    "branch": { "type": "string" },
    "milestones": {
      "type": "array",
      "items": { "type": "integer" }
    }
  }
}

NotificationRule

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://systemrpg.app/schema/notification-rule.json",
  "type": "object",
  "required": ["id", "workspaceId", "name", "trigger", "templateId", "enabled"],
  "properties": {
    "id": { "type": "string" },
    "workspaceId": { "type": "string" },
    "name": { "type": "string" },
    "trigger": { "type": "string" },
    "conditions": { "type": "object" },
    "templateId": { "type": "string" },
    "throttle": { "type": "string", "description": "e.g., '10s'" },
    "enabled": { "type": "boolean" }
  }
}

Notes:

  • This is a minimal, Phase-1-friendly schema set. Expand stats keys to all 12 physical/mental (and spiritual group hidden as needed) during implementation.
  • Ensure derived values are recomputable; treat stored derived as a cache with provenance.