{
  "$id": "https://devnw.dev/llm/pack.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Schema for a Sonny prompt pack YAML file (devnw.dev/llm.Pack).",
  "properties": {
    "decision_policy": {
      "$defs": {
        "module": {
          "additionalProperties": false,
          "properties": {
            "digest": {
              "description": "The module's AST digest (dpolicy digest), sha256:<64 hex>.",
              "type": "string"
            },
            "file": {
              "description": "A canonical AST JSON file (*.ast.json) relative to this pack file, inside its directory.",
              "type": "string"
            },
            "override": {
              "description": "Contract only: whether a descendant pack or a model variant may replace this slot (default locked).",
              "enum": [
                "allowed",
                "locked"
              ],
              "type": "string"
            }
          },
          "required": [
            "digest",
            "file"
          ],
          "type": "object"
        }
      },
      "additionalProperties": false,
      "description": "A versioned reference to a DPolicy decision policy (SONNY-1298, docs/POLICY_PACKS.md). Read by sonny, not llm.",
      "properties": {
        "activation": {
          "additionalProperties": false,
          "properties": {
            "boundary": {
              "enum": [
                "session"
              ],
              "type": "string"
            },
            "max_mode": {
              "description": "The strongest mode the policy may run in; the operator's mode stays the ceiling.",
              "enum": [
                "active",
                "shadow"
              ],
              "type": "string"
            }
          },
          "required": [
            "boundary"
          ],
          "type": "object"
        },
        "allow": {
          "additionalProperties": false,
          "properties": {
            "actions": {
              "description": "The actions a policy may declare, sorted.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "features": {
              "description": "The features a policy may declare, sorted.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "actions",
            "features"
          ],
          "type": "object"
        },
        "modules": {
          "additionalProperties": {
            "$ref": "#/properties/decision_policy/$defs/module"
          },
          "description": "Slots: each a root import alias and the module that fills it.",
          "type": "object"
        },
        "qualified": {
          "description": "Qualified (manifest, model target) pairs (SONNY-1299).",
          "items": {
            "additionalProperties": false,
            "properties": {
              "evidence": {
                "description": "The qualification record.",
                "type": "string"
              },
              "manifest": {
                "description": "The loaded closure's manifest digest.",
                "type": "string"
              },
              "served_models": {
                "description": "The provider-reported model names the qualification observed, sorted.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "target": {
                "description": "The MPR target compatibility digest, sha256:jcs1:<64 hex>.",
                "type": "string"
              }
            },
            "required": [
              "evidence",
              "manifest",
              "served_models",
              "target"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "root": {
          "$ref": "#/properties/decision_policy/$defs/module"
        },
        "schema": {
          "const": "sonny.pack.decision-policy/v1",
          "type": "string"
        },
        "variants": {
          "additionalProperties": {
            "additionalProperties": false,
            "properties": {
              "modules": {
                "additionalProperties": {
                  "$ref": "#/properties/decision_policy/$defs/module"
                },
                "type": "object"
              }
            },
            "required": [
              "modules"
            ],
            "type": "object"
          },
          "description": "Slot overrides per MPR model variant id.",
          "type": "object"
        }
      },
      "required": [
        "schema"
      ],
      "type": "object"
    },
    "pack": {
      "properties": {
        "agents": {
          "properties": {
            "allow_wildcard": {
              "type": "boolean"
            },
            "allowed": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "auto_spawn": {
              "items": {
                "properties": {
                  "agent_id": {
                    "type": "string"
                  },
                  "args": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "background": {
                    "type": "boolean"
                  },
                  "condition": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "expr": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "when": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "configs": {
              "items": {
                "properties": {
                  "args": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "command": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "env": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "id": {
                    "type": "string"
                  },
                  "work_dir": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "rules": {
              "items": {
                "properties": {
                  "applies_to": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "id": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "sub_packs": {
              "items": {
                "properties": {
                  "best_for": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "constraints": {
                    "properties": {
                      "always": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "never": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "description": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "inherit": {
                    "properties": {
                      "context_profiles": {
                        "description": "Omitted/empty and parent_only preserve the inherited selected profile ID. Other explicit profile inheritance modes are unsupported.",
                        "enum": [
                          "",
                          "parent_only"
                        ],
                        "type": "string"
                      },
                      "llm_profiles": {
                        "description": "Omitted/empty and parent_only preserve the inherited selected profile ID. Other explicit profile inheritance modes are unsupported.",
                        "enum": [
                          "",
                          "parent_only"
                        ],
                        "type": "string"
                      },
                      "lsp": {
                        "type": "string"
                      },
                      "mcp": {
                        "type": "string"
                      },
                      "system_prompt": {
                        "type": "string"
                      },
                      "tools": {
                        "type": "string"
                      },
                      "variables": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "lsp": {
                    "properties": {
                      "allowed": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "auto_start": {
                        "items": {
                          "properties": {
                            "condition": {
                              "properties": {
                                "description": {
                                  "type": "string"
                                },
                                "expr": {
                                  "type": "string"
                                },
                                "ref": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "language_id": {
                              "type": "string"
                            },
                            "when": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "detection": {
                        "properties": {
                          "by_extension": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "by_filename": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "by_pattern": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "rules": {
                        "items": {
                          "properties": {
                            "applies_to": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "id": {
                              "type": "string"
                            },
                            "priority": {
                              "type": "integer"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "servers": {
                        "items": {
                          "properties": {
                            "args": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "capabilities": {
                              "properties": {
                                "code_action": {
                                  "type": "boolean"
                                },
                                "completion": {
                                  "type": "boolean"
                                },
                                "definition": {
                                  "type": "boolean"
                                },
                                "diagnostics": {
                                  "type": "boolean"
                                },
                                "document_symbol": {
                                  "type": "boolean"
                                },
                                "formatting": {
                                  "type": "boolean"
                                },
                                "hover": {
                                  "type": "boolean"
                                },
                                "references": {
                                  "type": "boolean"
                                },
                                "rename": {
                                  "type": "boolean"
                                },
                                "text_document_sync": {
                                  "type": "boolean"
                                }
                              },
                              "type": "object"
                            },
                            "command": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "enabled": {
                              "type": "boolean"
                            },
                            "env": {
                              "additionalProperties": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "id": {
                              "type": "string"
                            },
                            "init_options": {
                              "additionalProperties": {},
                              "type": "object"
                            },
                            "root_pattern": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "servers_exhaustive": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "max_history_turns": {
                    "type": "integer"
                  },
                  "mcp": {
                    "properties": {
                      "allow_wildcard": {
                        "type": "boolean"
                      },
                      "allowed": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "rules": {
                        "items": {
                          "properties": {
                            "applies_to": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "id": {
                              "type": "string"
                            },
                            "priority": {
                              "type": "integer"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "servers": {
                        "items": {
                          "properties": {
                            "args": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "auth": {
                              "properties": {
                                "api_key": {
                                  "type": "string"
                                },
                                "api_key_env_var": {
                                  "type": "string"
                                },
                                "api_key_header": {
                                  "type": "string"
                                },
                                "password": {
                                  "type": "string"
                                },
                                "token": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string"
                                },
                                "username": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "auto_connect": {
                              "type": "boolean"
                            },
                            "capability_digest": {
                              "type": "string"
                            },
                            "command": {
                              "type": "string"
                            },
                            "compat": {
                              "properties": {
                                "accept_legacy_sse": {
                                  "type": "boolean"
                                },
                                "allow_unauthenticated_discovery": {
                                  "type": "boolean"
                                },
                                "omit_protocol_version_header": {
                                  "type": "boolean"
                                }
                              },
                              "type": "object"
                            },
                            "disable_standalone_sse": {
                              "type": "boolean"
                            },
                            "egress": {
                              "properties": {
                                "allow_hosts": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "allow_plain_http": {
                                  "type": "boolean"
                                },
                                "allow_ports": {
                                  "items": {
                                    "type": "integer"
                                  },
                                  "type": "array"
                                },
                                "allow_private_networks": {
                                  "type": "boolean"
                                },
                                "deny_private_networks": {
                                  "type": "boolean"
                                },
                                "proxy_url": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "enabled": {
                              "type": "boolean"
                            },
                            "env": {
                              "additionalProperties": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "env_allowlist": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "env_inherit_all": {
                              "type": "boolean"
                            },
                            "headers": {
                              "additionalProperties": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "max_protocol_version": {
                              "type": "string"
                            },
                            "max_retries": {
                              "type": "integer"
                            },
                            "min_protocol_version": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "oauth": {
                              "properties": {
                                "audience": {
                                  "type": "string"
                                },
                                "authorization_server": {
                                  "type": "string"
                                },
                                "client_id_ref": {
                                  "type": "string"
                                },
                                "client_secret_ref": {
                                  "type": "string"
                                },
                                "resource_metadata_url": {
                                  "type": "string"
                                },
                                "scopes": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "schema_version": {
                              "type": "string"
                            },
                            "timeout": {
                              "type": "integer"
                            },
                            "tls": {
                              "properties": {
                                "ca_bundle_ref": {
                                  "type": "string"
                                },
                                "insecure_acknowledged": {
                                  "type": "boolean"
                                },
                                "insecure_skip_verify": {
                                  "type": "boolean"
                                },
                                "min_version": {
                                  "type": "string"
                                },
                                "pinned_sha256": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "server_name": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "type": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            },
                            "work_dir": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "pack_ref": {
                    "type": "string"
                  },
                  "recommended_models": {
                    "items": {
                      "properties": {
                        "capabilities": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "min_context": {
                          "type": "integer"
                        },
                        "preference": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "tier": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "ref": {
                    "type": "string"
                  },
                  "system": {
                    "type": "string"
                  },
                  "tools": {
                    "properties": {
                      "allowed": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "path_constraints": {
                        "additionalProperties": {
                          "properties": {
                            "allow": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "type": "object"
                      },
                      "rules": {
                        "items": {
                          "properties": {
                            "applies_to": {
                              "properties": {
                                "tools": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "turns": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "id": {
                              "type": "string"
                            },
                            "priority": {
                              "type": "integer"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "variables": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "auto_models": {
          "items": {
            "properties": {
              "api_key_secret": {
                "type": "string"
              },
              "endpoint_url": {
                "type": "string"
              },
              "litellm": {
                "type": "boolean"
              },
              "model": {
                "type": "string"
              },
              "profile_id": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "compose": {
          "properties": {
            "include": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "merge": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "conditions": {
          "items": {
            "properties": {
              "description": {
                "type": "string"
              },
              "expr": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "context": {
          "properties": {
            "include": {
              "items": {
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "max_items": {
                    "type": "integer"
                  },
                  "paths": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "context_profiles": {
          "items": {
            "properties": {
              "description": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "max_tokens": {
                "type": "integer"
              },
              "policy": {
                "properties": {
                  "include": {
                    "items": {
                      "properties": {
                        "description": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "max_items": {
                          "type": "integer"
                        },
                        "paths": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "critics": {
          "items": {
            "properties": {
              "analysis": {
                "properties": {
                  "missing_metadata": {
                    "type": "string"
                  },
                  "output_schema": {
                    "type": "string"
                  },
                  "required_capabilities": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "route_category": {
                    "type": "string"
                  },
                  "version": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "description": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean"
              },
              "id": {
                "type": "string"
              },
              "min_files": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "profile_id": {
                "type": "string"
              },
              "severity_threshold": {
                "type": "string"
              },
              "triggers": {
                "items": {
                  "properties": {
                    "event": {
                      "type": "string"
                    },
                    "has_code": {
                      "type": "boolean"
                    },
                    "mentions": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "path_pattern": {
                      "type": "string"
                    },
                    "tools": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "datasets": {
          "items": {
            "properties": {
              "description": {
                "type": "string"
              },
              "destination_store_id": {
                "type": "string"
              },
              "format": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "default_context_profile_id": {
          "type": "string"
        },
        "default_fallback_models": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "default_io": {
          "properties": {
            "input_modalities": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "output_modalities": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "default_llm_profile_id": {
          "type": "string"
        },
        "eval_suites": {
          "items": {
            "properties": {
              "cases": {
                "items": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "must_contain": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "must_not_contain": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "state": {
                      "additionalProperties": {},
                      "type": "object"
                    },
                    "user_input": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "context_profile_id": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "graders": {
                "items": {
                  "properties": {
                    "must_contain": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "must_not_contain": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "id": {
                "type": "string"
              },
              "model_profile_id": {
                "type": "string"
              },
              "params": {
                "properties": {
                  "extra": {
                    "additionalProperties": {},
                    "type": "object"
                  },
                  "frequency_penalty": {
                    "type": "number"
                  },
                  "max_output_tokens": {
                    "type": "integer"
                  },
                  "presence_penalty": {
                    "type": "number"
                  },
                  "reasoning": {
                    "properties": {
                      "budget": {
                        "type": "integer"
                      },
                      "effort": {
                        "type": "string"
                      },
                      "enable": {
                        "type": "boolean"
                      },
                      "extra": {
                        "additionalProperties": {},
                        "type": "object"
                      },
                      "mode": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "response_format": {
                    "properties": {
                      "json_schema": {
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "schema": {
                            "additionalProperties": {},
                            "type": "object"
                          },
                          "strict": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "seed": {
                    "type": "integer"
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "id": {
          "type": "string"
        },
        "includes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "kind": {
          "type": "string"
        },
        "llm_profiles": {
          "items": {
            "properties": {
              "api_key_env": {
                "type": "string"
              },
              "base_url": {
                "type": "string"
              },
              "context_window_tokens": {
                "type": "integer"
              },
              "description": {
                "type": "string"
              },
              "fallback_models": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "id": {
                "type": "string"
              },
              "model": {
                "type": "string"
              },
              "params": {
                "properties": {
                  "extra": {
                    "additionalProperties": {},
                    "type": "object"
                  },
                  "frequency_penalty": {
                    "type": "number"
                  },
                  "max_output_tokens": {
                    "type": "integer"
                  },
                  "presence_penalty": {
                    "type": "number"
                  },
                  "reasoning": {
                    "properties": {
                      "budget": {
                        "type": "integer"
                      },
                      "effort": {
                        "type": "string"
                      },
                      "enable": {
                        "type": "boolean"
                      },
                      "extra": {
                        "additionalProperties": {},
                        "type": "object"
                      },
                      "mode": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "response_format": {
                    "properties": {
                      "json_schema": {
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "schema": {
                            "additionalProperties": {},
                            "type": "object"
                          },
                          "strict": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "seed": {
                    "type": "integer"
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  }
                },
                "type": "object"
              },
              "provider": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "locale": {
          "type": "string"
        },
        "lsp": {
          "properties": {
            "allowed": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "auto_start": {
              "items": {
                "properties": {
                  "condition": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "expr": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "language_id": {
                    "type": "string"
                  },
                  "when": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "detection": {
              "properties": {
                "by_extension": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "by_filename": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "by_pattern": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              },
              "type": "object"
            },
            "rules": {
              "items": {
                "properties": {
                  "applies_to": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "id": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "servers": {
              "items": {
                "properties": {
                  "args": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "capabilities": {
                    "properties": {
                      "code_action": {
                        "type": "boolean"
                      },
                      "completion": {
                        "type": "boolean"
                      },
                      "definition": {
                        "type": "boolean"
                      },
                      "diagnostics": {
                        "type": "boolean"
                      },
                      "document_symbol": {
                        "type": "boolean"
                      },
                      "formatting": {
                        "type": "boolean"
                      },
                      "hover": {
                        "type": "boolean"
                      },
                      "references": {
                        "type": "boolean"
                      },
                      "rename": {
                        "type": "boolean"
                      },
                      "text_document_sync": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "command": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "env": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "id": {
                    "type": "string"
                  },
                  "init_options": {
                    "additionalProperties": {},
                    "type": "object"
                  },
                  "root_pattern": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "servers_exhaustive": {
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "mcp": {
          "properties": {
            "allow_wildcard": {
              "type": "boolean"
            },
            "allowed": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "rules": {
              "items": {
                "properties": {
                  "applies_to": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "id": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "servers": {
              "items": {
                "properties": {
                  "args": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "auth": {
                    "properties": {
                      "api_key": {
                        "type": "string"
                      },
                      "api_key_env_var": {
                        "type": "string"
                      },
                      "api_key_header": {
                        "type": "string"
                      },
                      "password": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "username": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "auto_connect": {
                    "type": "boolean"
                  },
                  "capability_digest": {
                    "type": "string"
                  },
                  "command": {
                    "type": "string"
                  },
                  "compat": {
                    "properties": {
                      "accept_legacy_sse": {
                        "type": "boolean"
                      },
                      "allow_unauthenticated_discovery": {
                        "type": "boolean"
                      },
                      "omit_protocol_version_header": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "disable_standalone_sse": {
                    "type": "boolean"
                  },
                  "egress": {
                    "properties": {
                      "allow_hosts": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "allow_plain_http": {
                        "type": "boolean"
                      },
                      "allow_ports": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "allow_private_networks": {
                        "type": "boolean"
                      },
                      "deny_private_networks": {
                        "type": "boolean"
                      },
                      "proxy_url": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "env": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "env_allowlist": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "env_inherit_all": {
                    "type": "boolean"
                  },
                  "headers": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "max_protocol_version": {
                    "type": "string"
                  },
                  "max_retries": {
                    "type": "integer"
                  },
                  "min_protocol_version": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "oauth": {
                    "properties": {
                      "audience": {
                        "type": "string"
                      },
                      "authorization_server": {
                        "type": "string"
                      },
                      "client_id_ref": {
                        "type": "string"
                      },
                      "client_secret_ref": {
                        "type": "string"
                      },
                      "resource_metadata_url": {
                        "type": "string"
                      },
                      "scopes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "schema_version": {
                    "type": "string"
                  },
                  "timeout": {
                    "type": "integer"
                  },
                  "tls": {
                    "properties": {
                      "ca_bundle_ref": {
                        "type": "string"
                      },
                      "insecure_acknowledged": {
                        "type": "boolean"
                      },
                      "insecure_skip_verify": {
                        "type": "boolean"
                      },
                      "min_version": {
                        "type": "string"
                      },
                      "pinned_sha256": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "server_name": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "work_dir": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "memory": {
          "properties": {
            "acl_any": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "embedding_role": {
              "type": "string"
            },
            "freshness_max_age": {
              "type": "integer"
            },
            "index_chunks": {
              "type": "boolean"
            },
            "retrieve_top_k": {
              "type": "integer"
            }
          },
          "type": "object"
        },
        "metadata": {
          "properties": {
            "author": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "homepage": {
              "type": "string"
            },
            "license": {
              "type": "string"
            },
            "provenance": {
              "properties": {
                "commit_sha": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "source_url": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "support_url": {
              "type": "string"
            },
            "tags": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "output_contract": {
          "properties": {
            "cite_file_lines": {
              "type": "boolean"
            },
            "forbid_fabricated_dates": {
              "type": "boolean"
            },
            "forbid_partial_read_whole_file_claims": {
              "type": "boolean"
            },
            "max_retries": {
              "type": "integer"
            },
            "require_final_verification_log": {
              "type": "boolean"
            },
            "require_tool_backed_claims": {
              "type": "boolean"
            },
            "severity_caps": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            }
          },
          "type": "object"
        },
        "pack_eval_suite": {
          "properties": {
            "cases": {
              "items": {
                "properties": {
                  "any_of": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "expected_pattern": {
                    "type": "string"
                  },
                  "forbidden_pattern": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "input": {
                    "type": "string"
                  },
                  "judge": {
                    "properties": {
                      "model": {
                        "type": "string"
                      },
                      "rubric": {
                        "type": "string"
                      },
                      "threshold": {
                        "type": "number"
                      }
                    },
                    "type": "object"
                  },
                  "min_matches": {
                    "properties": {
                      "min": {
                        "type": "integer"
                      },
                      "options": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "timeout_seconds": {
                    "type": "integer"
                  },
                  "tools_allowed": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "parent": {
          "type": "string"
        },
        "policy_version": {
          "type": "string"
        },
        "recommended_models": {
          "items": {
            "properties": {
              "capabilities": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "min_context": {
                "type": "integer"
              },
              "preference": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "tier": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "redaction_profiles": {
          "items": {
            "properties": {
              "description": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "rules": {
                "items": {
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "mask_with": {
                      "type": "string"
                    },
                    "match_key": {
                      "type": "string"
                    },
                    "match_key_contains": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "requires": {
          "properties": {
            "capabilities": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "effects": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "optional_tools": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "tools": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "secrets": {
          "items": {
            "properties": {
              "command": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "description": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "required": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "semantic_cache": {
          "type": "string"
        },
        "supported_modalities": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "tool_efficiency": {
          "properties": {
            "artifact_retention": {
              "type": "string"
            },
            "candidate_work_budget": {
              "type": "integer"
            },
            "discovery_fallback": {
              "type": "string"
            },
            "helper_profiles": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "history_budget_tokens": {
              "type": "integer"
            },
            "max_parallel_reads": {
              "type": "integer"
            },
            "observability_mode": {
              "type": "string"
            },
            "profile": {
              "type": "string"
            },
            "result_view_budget_bytes": {
              "type": "integer"
            },
            "schema_budget_tokens": {
              "type": "integer"
            },
            "stages": {
              "additionalProperties": {
                "type": "boolean"
              },
              "type": "object"
            },
            "version": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "tools": {
          "properties": {
            "allowed": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "declared": {
              "description": "Tools declared to the model directly, in addition to the core set (tool_search, tool_exec, think, read_file, edit_file, write_file, exec, find, todo_*). Every other allowed tool is reached through tool_search and tool_exec. Must be a subset of tools.allowed.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "path_constraints": {
              "additionalProperties": {
                "properties": {
                  "allow": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "type": "object"
            },
            "rules": {
              "items": {
                "properties": {
                  "applies_to": {
                    "properties": {
                      "tools": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "turns": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "id": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "variables": {
          "properties": {
            "definitions": {
              "items": {
                "properties": {
                  "default": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "version": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "prompts": {
      "items": {
        "properties": {
          "additional_details": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "compose": {
            "properties": {
              "include": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "merge": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "conditions": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "expr": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "constraints": {
            "properties": {
              "always": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "never": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "context": {
            "properties": {
              "include": {
                "items": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "max_items": {
                      "type": "integer"
                    },
                    "paths": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "guidelines": {
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "modalities": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "priority": {
                  "type": "integer"
                },
                "values": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "priority": {
            "type": "integer"
          },
          "ref": {
            "type": "string"
          },
          "responsibilities": {
            "items": {
              "properties": {
                "id": {
                  "type": "string"
                },
                "priority": {
                  "type": "integer"
                },
                "values": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "system": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "tools": {
            "properties": {
              "allowed": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "path_constraints": {
                "additionalProperties": {
                  "properties": {
                    "allow": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "type": "object"
              },
              "rules": {
                "items": {
                  "properties": {
                    "applies_to": {
                      "properties": {
                        "tools": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "turns": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "id": {
                      "type": "string"
                    },
                    "priority": {
                      "type": "integer"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "turns": {
            "items": {
              "properties": {
                "agent_id": {
                  "type": "string"
                },
                "conditions": {
                  "properties": {
                    "loop": {
                      "properties": {
                        "max_iterations": {
                          "type": "integer"
                        },
                        "on_exceed": {
                          "properties": {
                            "action": {
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "until": {
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "expr": {
                              "type": "string"
                            },
                            "ref": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "while": {
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "expr": {
                              "type": "string"
                            },
                            "ref": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "retry": {
                      "properties": {
                        "backoff_ms": {
                          "type": "integer"
                        },
                        "max_attempts": {
                          "type": "integer"
                        },
                        "on": {
                          "items": {
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "expr": {
                                "type": "string"
                              },
                              "ref": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "skip_when": {
                      "items": {
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "expr": {
                            "type": "string"
                          },
                          "ref": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "transitions": {
                      "items": {
                        "properties": {
                          "action": {
                            "type": "string"
                          },
                          "goto": {
                            "type": "string"
                          },
                          "note": {
                            "type": "string"
                          },
                          "when": {
                            "properties": {
                              "description": {
                                "type": "string"
                              },
                              "expr": {
                                "type": "string"
                              },
                              "ref": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "when": {
                      "items": {
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "expr": {
                            "type": "string"
                          },
                          "ref": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "defaults": {
                  "properties": {
                    "context_profile_id": {
                      "type": "string"
                    },
                    "context_window_tokens": {
                      "type": "integer"
                    },
                    "llm_params": {
                      "properties": {
                        "extra": {
                          "additionalProperties": {},
                          "type": "object"
                        },
                        "frequency_penalty": {
                          "type": "number"
                        },
                        "max_output_tokens": {
                          "type": "integer"
                        },
                        "presence_penalty": {
                          "type": "number"
                        },
                        "reasoning": {
                          "properties": {
                            "budget": {
                              "type": "integer"
                            },
                            "effort": {
                              "type": "string"
                            },
                            "enable": {
                              "type": "boolean"
                            },
                            "extra": {
                              "additionalProperties": {},
                              "type": "object"
                            },
                            "mode": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "response_format": {
                          "properties": {
                            "json_schema": {
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "schema": {
                                  "additionalProperties": {},
                                  "type": "object"
                                },
                                "strict": {
                                  "type": "boolean"
                                }
                              },
                              "type": "object"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "seed": {
                          "type": "integer"
                        },
                        "temperature": {
                          "type": "number"
                        },
                        "top_p": {
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "llm_profile_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "detail": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "io": {
                  "properties": {
                    "input_modalities": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "output_modalities": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "operations": {
                  "items": {
                    "properties": {
                      "child": {
                        "properties": {},
                        "type": "object"
                      },
                      "collect_as": {
                        "type": "string"
                      },
                      "collect_from": {
                        "type": "string"
                      },
                      "concurrency_group": {
                        "type": "string"
                      },
                      "context_profile_id": {
                        "type": "string"
                      },
                      "context_window_tokens": {
                        "type": "integer"
                      },
                      "dataset_id": {
                        "type": "string"
                      },
                      "depends_on": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "format": {
                        "type": "string"
                      },
                      "id": {
                        "type": "string"
                      },
                      "index_var": {
                        "type": "string"
                      },
                      "input_ref_paths": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "input_state_paths": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "input_text": {
                        "type": "string"
                      },
                      "instruction": {
                        "type": "string"
                      },
                      "item_var": {
                        "type": "string"
                      },
                      "items_state_path": {
                        "type": "string"
                      },
                      "job_ref_key": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "llm_params": {
                        "properties": {
                          "extra": {
                            "additionalProperties": {},
                            "type": "object"
                          },
                          "frequency_penalty": {
                            "type": "number"
                          },
                          "max_output_tokens": {
                            "type": "integer"
                          },
                          "presence_penalty": {
                            "type": "number"
                          },
                          "reasoning": {
                            "properties": {
                              "budget": {
                                "type": "integer"
                              },
                              "effort": {
                                "type": "string"
                              },
                              "enable": {
                                "type": "boolean"
                              },
                              "extra": {
                                "additionalProperties": {},
                                "type": "object"
                              },
                              "mode": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "response_format": {
                            "properties": {
                              "json_schema": {
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "schema": {
                                    "additionalProperties": {},
                                    "type": "object"
                                  },
                                  "strict": {
                                    "type": "boolean"
                                  }
                                },
                                "type": "object"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "seed": {
                            "type": "integer"
                          },
                          "temperature": {
                            "type": "number"
                          },
                          "top_p": {
                            "type": "number"
                          }
                        },
                        "type": "object"
                      },
                      "llm_profile_id": {
                        "type": "string"
                      },
                      "mode": {
                        "type": "string"
                      },
                      "output_ref_key": {
                        "type": "string"
                      },
                      "output_summary_key": {
                        "type": "string"
                      },
                      "redaction_profile_id": {
                        "type": "string"
                      },
                      "source": {
                        "type": "string"
                      },
                      "suite_id": {
                        "type": "string"
                      },
                      "tool": {
                        "type": "string"
                      },
                      "tool_params": {
                        "additionalProperties": {},
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                },
                "order": {
                  "type": "integer"
                },
                "parallel": {
                  "type": "boolean"
                },
                "preconditions": {
                  "items": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "expr": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                },
                "prompt_ref": {
                  "type": "string"
                },
                "sub_steps": {
                  "items": {
                    "properties": {},
                    "type": "object"
                  },
                  "type": "array"
                },
                "success_criteria": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "tool_requirements": {
                  "items": {
                    "properties": {
                      "condition": {
                        "type": "string"
                      },
                      "instructions": {
                        "type": "string"
                      },
                      "retry": {
                        "properties": {
                          "backoff_ms": {
                            "type": "integer"
                          },
                          "max_attempts": {
                            "type": "integer"
                          },
                          "on": {
                            "items": {
                              "properties": {
                                "description": {
                                  "type": "string"
                                },
                                "expr": {
                                  "type": "string"
                                },
                                "ref": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "tool": {
                        "type": "string"
                      },
                      "when": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "version": {
      "type": "integer"
    }
  },
  "required": [
    "version",
    "pack",
    "prompts"
  ],
  "title": "Sonny Pack",
  "type": "object"
}
