{
  "feature": "lighting-system",
  "version": "1.0.0",
  "description": "Directional, point, and spot light rendering",
  "category": "integration",
  "tags": [
    "integration",
    "godot"
  ],
  "actors": [
    {
      "id": "game_engine",
      "name": "Godot Engine",
      "type": "system"
    }
  ],
  "outcomes": {
    "directional_lights": {
      "given": [
        "Sun-like lights from infinity is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Sun-like lights from infinity completed",
      "priority": 1
    },
    "point_lights": {
      "given": [
        "Omni-directional radial lights is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Omni-directional radial lights completed",
      "priority": 2
    },
    "spot_lights": {
      "given": [
        "Cone-shaped lights with falloff is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Cone-shaped lights with falloff completed",
      "priority": 3
    },
    "light_intensity": {
      "given": [
        "Control brightness is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Control brightness completed",
      "priority": 4
    },
    "shadow_mapping": {
      "given": [
        "Real-time shadow casting is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Real-time shadow casting completed",
      "priority": 5
    }
  },
  "rules": {
    "implementation": {
      "description": "Feature implemented in C++ engine core"
    },
    "platform_agnostic": {
      "description": "Works across desktop, web, mobile platforms"
    }
  },
  "related": [],
  "agi": {
    "goals": [
      {
        "id": "reliable_lighting_system",
        "description": "Directional, point, and spot light rendering",
        "success_metrics": [
          {
            "metric": "success_rate",
            "target": ">= 99.5%",
            "measurement": "Successful operations divided by total attempts"
          },
          {
            "metric": "error_recovery_rate",
            "target": ">= 95%",
            "measurement": "Errors that auto-recover without manual intervention"
          }
        ],
        "constraints": [
          {
            "type": "availability",
            "description": "Must degrade gracefully when dependencies are unavailable",
            "negotiable": false
          }
        ]
      }
    ],
    "autonomy": {
      "level": "supervised"
    },
    "safety": {
      "action_permissions": [
        {
          "action": "directional_lights",
          "permission": "autonomous"
        },
        {
          "action": "point_lights",
          "permission": "autonomous"
        },
        {
          "action": "spot_lights",
          "permission": "autonomous"
        },
        {
          "action": "light_intensity",
          "permission": "autonomous"
        },
        {
          "action": "shadow_mapping",
          "permission": "autonomous"
        }
      ]
    },
    "tradeoffs": [
      {
        "prefer": "reliability",
        "over": "throughput",
        "reason": "integration failures can cascade across systems"
      }
    ]
  },
  "extensions": {
    "tech_stack": {
      "language": "C++",
      "runtime": "Godot 4.x"
    }
  }
}