{
  "body": {
    "send": [
      {
        "path": "results.*.record",
        "target": {
          "kind": "*"
        },
        "target_kind_field": "kind"
      }
    ],
    "notice": [
      {
        "path": "record.record",
        "target": {
          "kind": "*"
        }
      }
    ],
    "workout": [
      {
        "path": "current_version.record",
        "target": {
          "kind": "workout_version"
        }
      },
      {
        "path": "blocks.*.children.**.exercise.record",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "blocks.*.children.**.exercise.snapshot.category.record",
        "target": {
          "kind": "category"
        }
      },
      {
        "path": "blocks.*.children.**.variant.ref",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "value": "part_id",
        "target_path": "../exercise.record"
      },
      {
        "path": "blocks.*.children.**.modifiers.*.id",
        "target": {
          "kind": "modifier"
        }
      },
      {
        "path": "blocks.*.children.**.prescriptions.*.modifiers.*.id",
        "target": {
          "kind": "modifier"
        }
      }
    ],
    "workout_version": [
      {
        "path": "workout.record",
        "target": {
          "kind": "workout"
        }
      },
      {
        "path": "parent.record",
        "target": {
          "kind": "workout_version"
        }
      },
      {
        "path": "body.current_version.record",
        "target": {
          "kind": "workout_version"
        }
      },
      {
        "path": "body.blocks.*.children.**.exercise.record",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "body.blocks.*.children.**.exercise.snapshot.category.record",
        "target": {
          "kind": "category"
        }
      },
      {
        "path": "body.blocks.*.children.**.variant.ref",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "value": "part_id",
        "target_path": "../exercise.record"
      },
      {
        "path": "body.blocks.*.children.**.modifiers.*.id",
        "target": {
          "kind": "modifier"
        }
      },
      {
        "path": "body.blocks.*.children.**.prescriptions.*.modifiers.*.id",
        "target": {
          "kind": "modifier"
        }
      }
    ],
    "program": [
      {
        "path": "schedule.cycles.*.days.*.sessions.*.workout.record",
        "target": {
          "kind": "workout"
        }
      },
      {
        "path": "schedule.cycles.*.days.*.sessions.*.version.record",
        "target": {
          "kind": "workout_version"
        }
      },
      {
        "path": "schedule.cycles.*.days.*.phase",
        "target": {
          "kind": "program",
          "part_type": "phase"
        },
        "value": "part_id",
        "local": true
      },
      {
        "path": "progression_rules.*.applies_to.workout.record",
        "target": {
          "kind": "workout",
          "part_type": "slot"
        },
        "part_path": "../slot"
      },
      {
        "path": "progression_rules.*.exercise.record",
        "target": {
          "kind": "exercise"
        }
      }
    ],
    "program_run": [
      {
        "path": "program.record",
        "target": {
          "kind": "program"
        }
      },
      {
        "path": "previous_run.record",
        "target": {
          "kind": "program_run"
        }
      },
      {
        "path": "planned.*.workout.record",
        "target": {
          "kind": "workout"
        }
      },
      {
        "path": "planned.*.version.record",
        "target": {
          "kind": "workout_version"
        }
      },
      {
        "path": "planned.*.session.record",
        "target": {
          "kind": "session"
        }
      },
      {
        "path": "planned.*.day",
        "target": {
          "kind": "program",
          "part_type": "day"
        },
        "value": "part_id",
        "target_path": "$root.program.record"
      },
      {
        "path": "planned.*.phase",
        "target": {
          "kind": "program",
          "part_type": "phase"
        },
        "value": "part_id",
        "target_path": "$root.program.record"
      },
      {
        "path": "anchors.*.rule.record",
        "target": {
          "kind": "program",
          "part_type": "rule"
        },
        "part_path": "part"
      },
      {
        "path": "anchors.*.source_session.record",
        "target": {
          "kind": "session"
        }
      }
    ],
    "planned_workout": [
      {
        "path": "workout.record",
        "target": {
          "kind": "workout"
        }
      },
      {
        "path": "version.record",
        "target": {
          "kind": "workout_version"
        }
      },
      {
        "path": "session.record",
        "target": {
          "kind": "session"
        }
      }
    ],
    "session": [
      {
        "path": "workout.record",
        "target": {
          "kind": "workout"
        }
      },
      {
        "path": "version.record",
        "target": {
          "kind": "workout_version"
        }
      },
      {
        "path": "occurrences.*.exercise.record",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "occurrences.*.exercise.snapshot.category.record",
        "target": {
          "kind": "category"
        }
      },
      {
        "path": "occurrences.*.variant.ref",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "value": "part_id",
        "target_path": "../exercise.record"
      },
      {
        "path": "occurrences.*.plan.planned_session.record",
        "target": {
          "kind": "program_run",
          "part_type": "planned"
        },
        "part_path": "part",
        "kind_without_part": "planned_workout"
      },
      {
        "path": "occurrences.*.plan.rule.record",
        "target": {
          "kind": "program",
          "part_type": "rule"
        },
        "part_path": "part"
      },
      {
        "path": "occurrences.*.plan.targets.*.comparison.effective_exercise.record",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "occurrences.*.plan.decision.evidence_session_ids.*",
        "target": {
          "kind": "session"
        }
      },
      {
        "path": "occurrences.*.plan.targets.*.comparison.variant.ref",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "value": "part_id",
        "target_path": "../effective_exercise.record"
      },
      {
        "path": "occurrences.*.plan.targets.*.comparison.modifiers.*.id",
        "target": {
          "kind": "modifier"
        }
      },
      {
        "path": "occurrences.*.sets.*.tags.*.tag.record",
        "target": {
          "kind": "tag"
        }
      },
      {
        "path": "execution.focused_set",
        "target": {
          "kind": "session",
          "part_type": "set"
        },
        "value": "part_id",
        "local": true
      },
      {
        "path": "execution.focused_slot",
        "target": {
          "kind": "workout_version",
          "part_type": "slot"
        },
        "value": "part_id",
        "target_path": "$root.version.record",
        "fallback_target_path": "$root.workout.record",
        "fallback_target_kind": "workout"
      },
      {
        "path": "occurrences.*.slot",
        "target": {
          "kind": "workout_version",
          "part_type": "slot"
        },
        "value": "part_id",
        "target_path": "$root.version.record",
        "fallback_target_path": "$root.workout.record",
        "fallback_target_kind": "workout"
      },
      {
        "path": "occurrences.*.block_path.*",
        "target": {
          "kind": "workout_version",
          "part_type": "block"
        },
        "value": "part_id",
        "target_path": "$root.version.record",
        "fallback_target_path": "$root.workout.record",
        "fallback_target_kind": "workout"
      },
      {
        "path": "occurrences.*.prescription_snapshot.*.modifiers.*.id",
        "target": {
          "kind": "modifier"
        }
      },
      {
        "path": "occurrences.*.substitutes",
        "target": {
          "kind": "workout_version",
          "part_type": "slot"
        },
        "value": "part_id",
        "target_path": "$root.version.record",
        "fallback_target_path": "$root.workout.record",
        "fallback_target_kind": "workout"
      },
      {
        "path": "occurrences.*.sets.*.prescription",
        "target": {
          "kind": "workout_version",
          "part_type": "prescription"
        },
        "value": "part_id",
        "target_path": "$root.version.record",
        "fallback_target_path": "$root.workout.record",
        "fallback_target_kind": "workout",
        "parent_part_path": "../../slot"
      },
      {
        "path": "occurrences.*.sets.*.parent_set",
        "target": {
          "kind": "session",
          "part_type": "set"
        },
        "value": "part_id",
        "local": true
      }
    ],
    "exercise": [
      {
        "path": "category.record",
        "target": {
          "kind": "category"
        }
      },
      {
        "path": "default_variant",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "value": "part_id",
        "local": true
      },
      {
        "path": "variants.*.load_policy.change.record",
        "target": {
          "kind": "operation_log"
        },
        "opaque": true
      },
      {
        "path": "modifier_policies.*.modifier.record",
        "target": {
          "kind": "modifier"
        }
      },
      {
        "path": "modifier_policies.*.change.record",
        "target": {
          "kind": "operation_log"
        },
        "opaque": true
      },
      {
        "path": "catalog_links.*.operation.record",
        "target": {
          "kind": "operation_log"
        },
        "opaque": true
      },
      {
        "path": "catalog_bases.*.operation.record",
        "target": {
          "kind": "operation_log"
        },
        "opaque": true
      },
      {
        "path": "resolutions.*.operation.record",
        "target": {
          "kind": "operation_log"
        },
        "opaque": true
      },
      {
        "path": "resolutions.*.target.record",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "part_path": "../target_variant"
      }
    ],
    "exercise_override": [
      {
        "path": "scope.version.record",
        "target": {
          "kind": "workout_version",
          "part_type": "slot"
        },
        "part_path": "../slot"
      },
      {
        "path": "scope.prescription",
        "target": {
          "kind": "workout_version",
          "part_type": "prescription"
        },
        "value": "part_id",
        "target_path": "version.record",
        "parent_part_path": "slot"
      },
      {
        "path": "scope.session.record",
        "target": {
          "kind": "session",
          "part_type": "occurrence"
        },
        "part_path": "../occurrence"
      },
      {
        "path": "scope.set",
        "target": {
          "kind": "session",
          "part_type": "set"
        },
        "value": "part_id",
        "target_path": "session.record",
        "parent_part_path": "occurrence"
      },
      {
        "path": "scope.chart.record",
        "target": {
          "kind": "chart"
        }
      },
      {
        "path": "operation.record",
        "target": {
          "kind": "operation_log"
        },
        "opaque": true
      },
      {
        "path": "source_exercise.record",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "target_exercise.record",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "variant.ref",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "value": "part_id",
        "target_path": "../target_exercise.record"
      }
    ],
    "modifier_assignment": [
      {
        "path": "modifiers.*.id",
        "target": {
          "kind": "modifier"
        }
      },
      {
        "path": "scope.version.record",
        "target": {
          "kind": "workout_version",
          "part_type": "slot"
        },
        "part_path": "../slot"
      },
      {
        "path": "scope.prescription",
        "target": {
          "kind": "workout_version",
          "part_type": "prescription"
        },
        "value": "part_id",
        "target_path": "version.record",
        "parent_part_path": "slot"
      },
      {
        "path": "scope.session.record",
        "target": {
          "kind": "session",
          "part_type": "occurrence"
        },
        "part_path": "../occurrence"
      },
      {
        "path": "scope.set",
        "target": {
          "kind": "session",
          "part_type": "set"
        },
        "value": "part_id",
        "target_path": "session.record",
        "parent_part_path": "occurrence"
      },
      {
        "path": "scope.chart.record",
        "target": {
          "kind": "chart"
        }
      },
      {
        "path": "source_exercise.record",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "supersedes.record",
        "target": {
          "kind": "modifier_assignment"
        }
      },
      {
        "path": "change.record",
        "target": {
          "kind": "operation_log"
        },
        "opaque": true
      }
    ],
    "guide": [
      {
        "path": "cover_stop",
        "target": {
          "kind": "guide",
          "part_type": "stop"
        },
        "value": "part_id",
        "local": true
      },
      {
        "path": "days.*.stops.*.ref",
        "target": {
          "kind": "place"
        },
        "when": {
          "field": "kind",
          "value": "place"
        }
      },
      {
        "path": "days.*.stops.*.ref",
        "target": {
          "kind": "event"
        },
        "when": {
          "field": "kind",
          "value": "event"
        }
      }
    ],
    "recipe": [
      {
        "path": "steps.*.ingredient_ids.*",
        "target": {
          "kind": "recipe",
          "part_type": "ingredient"
        },
        "value": "part_id",
        "local": true
      }
    ],
    "tab": [
      {
        "path": "sections.*.measures.*.chord_id",
        "target": {
          "kind": "tab",
          "part_type": "tab_chord"
        },
        "value": "part_id",
        "local": true
      }
    ],
    "meal": [
      {
        "path": "recipe_id",
        "target": {
          "kind": "recipe"
        }
      }
    ],
    "app_preferences": [
      {
        "path": "library.favorites.*",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "library.recent.*",
        "target": {
          "kind": "exercise"
        }
      },
      {
        "path": "library.recent_choices.*.exercise_id",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "part_path": "variant_id"
      },
      {
        "path": "remembered_choices.*.exercise_id",
        "target": {
          "kind": "exercise",
          "part_type": "variant"
        },
        "part_path": "variant_id"
      }
    ],
    "training_preferences": [
      {
        "path": "entry_units.*.target_id",
        "target": {
          "kind": "session"
        },
        "when": {
          "field": "scope",
          "value": "session"
        }
      },
      {
        "path": "entry_units.*.target_id",
        "target": {
          "kind": "exercise"
        },
        "when": {
          "field": "scope",
          "value": "exercise"
        }
      }
    ],
    "grocery_list": [
      {
        "path": "items.*.recipe_id",
        "target": {
          "kind": "recipe"
        }
      },
      {
        "path": "items.*.meal_id",
        "target": {
          "kind": "meal"
        }
      }
    ]
  },
  "envelope": [
    {
      "path": "relations.*.target",
      "target": {
        "kind": "*"
      }
    }
  ]
}
