{
  "id": "partition-packets",
  "description": "Partition an entire root or packet into explicitly named nested packets, preserving card order and faces with explicit physical output metadata",
  "labels": {
    "en": "Partition into named packets"
  },
  "family_ref": "true-cuts",
  "action_contract": {
    "requires": [
      "source"
    ],
    "parameters": {
      "outputs": {
        "required": true,
        "domain": "packet_outputs",
        "description": "Ordered named outputs, each with positive size or final rest and optional physical packet metadata"
      }
    },
    "post_state_invariant": "All source cards occupy the named output packets in contiguous top-to-bottom segments. Root source is empty; nested source is consumed. Each output inherits the source face baseline, with exactly its declared location, custodian and display orientation. All other physical state is unchanged.",
    "post_state": {
      "state_schema_ref": "https://tamaraspec.org/schema/tcs-playing-cards-state-0.1.json",
      "effects": [
        {
          "op": "partition_packets",
          "subject": "source",
          "outputs": {
            "param": "outputs"
          }
        }
      ]
    }
  }
}