{
  "feature": "collision-shapes",
  "version": "1.0.0",
  "description": "Primitive collision shapes for physics and raycasting",
  "category": "integration",
  "tags": [
    "integration",
    "godot"
  ],
  "actors": [
    {
      "id": "game_engine",
      "name": "Godot Engine",
      "type": "system"
    }
  ],
  "outcomes": {
    "box_shape": {
      "given": [
        "Axis-aligned bounding box is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Axis-aligned bounding box completed",
      "priority": 1
    },
    "sphere_shape": {
      "given": [
        "Spherical collision is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Spherical collision completed",
      "priority": 2
    },
    "capsule_shape": {
      "given": [
        "Cylinder with rounded ends is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Cylinder with rounded ends completed",
      "priority": 3
    },
    "cylinder_shape": {
      "given": [
        "Circular extrusion is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Circular extrusion completed",
      "priority": 4
    },
    "mesh_shape": {
      "given": [
        "Trimesh from model data is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Trimesh from model data completed",
      "priority": 5
    },
    "convex_shape": {
      "given": [
        "Optimized convex hull is requested"
      ],
      "then": [
        {
          "action": "transition_state",
          "field": "status",
          "from": "idle",
          "to": "active"
        }
      ],
      "result": "Optimized convex hull completed",
      "priority": 6
    }
  },
  "rules": {
    "implementation": {
      "description": "Feature implemented in C++ engine core"
    },
    "platform_agnostic": {
      "description": "Works across desktop, web, mobile platforms"
    }
  },
  "related": [],
  "agi": {
    "goals": [
      {
        "id": "reliable_collision_shapes",
        "description": "Primitive collision shapes for physics and raycasting",
        "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": "box_shape",
          "permission": "autonomous"
        },
        {
          "action": "sphere_shape",
          "permission": "autonomous"
        },
        {
          "action": "capsule_shape",
          "permission": "autonomous"
        },
        {
          "action": "cylinder_shape",
          "permission": "autonomous"
        },
        {
          "action": "mesh_shape",
          "permission": "autonomous"
        },
        {
          "action": "convex_shape",
          "permission": "autonomous"
        }
      ]
    },
    "tradeoffs": [
      {
        "prefer": "reliability",
        "over": "throughput",
        "reason": "integration failures can cascade across systems"
      }
    ]
  },
  "extensions": {
    "tech_stack": {
      "language": "C++",
      "runtime": "Godot 4.x"
    }
  }
}