Recipaie Schema

recipaie schema 定义了部署配方的结构——描述如何安装和配置软件的模板。

Schema 地址:

https://recipaie.com/schemas/recipaie.schema.json

必填字段

字段类型说明

name

string服务或应用的名称

version

stringrecipaie 的语义化版本号(例如 "1.0.0")

steps

array按顺序排列的部署步骤列表

step_count

integer步骤总数(必须与 steps 数组长度一致)

可选字段

字段类型说明

description

string简要说明这份配方部署的是什么

prerequisites

array开始前所需的工具或条件

步骤结构

steps 数组中的每一步都必须包含:

字段是否必填说明

order

步骤编号(从 1 开始)

what

要执行什么操作

why

为什么需要这一步(用于建立上下文)

when

何时或在什么条件下执行此步骤

skip_if

跳过此步骤的条件

how

如何执行该操作(命令或说明)

verify

如何验证该步骤已成功

comments

补充上下文或备注
完整的 Schema JSON
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://recipaie.publifye.pro/recipaie.schema.json",
  "title": "Recipaie",
  "description": "Recipe for AI - a simple deployment guide schema for AI assistants",
  "type": "object",
  "required": ["name", "version", "steps", "step_count"],
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Reference to the recipaie schema"
    },
    "name": {
      "type": "string",
      "description": "Name of the service or application"
    },
    "flavor": {
      "type": "string",
      "description": "Variant identifier (e.g., 'dev', 'deploy'). Empty or omitted for the main recipaie. Must match filename suffix: recipaie-{flavor}.json"
    },
    "version": {
      "type": "string",
      "description": "Semantic version of the recipaie (e.g., '1.0.0')"
    },
    "description": {
      "type": "string",
      "description": "Brief description of what this recipe deploys"
    },
    "prerequisites": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Tools or conditions that must exist before starting (e.g., docker, pubmcp)"
    },
    "steps": {
      "type": "array",
      "description": "Ordered list of deployment steps",
      "items": {
        "type": "object",
        "required": ["order", "what", "why", "when", "how", "verify"],
        "properties": {
          "order": {
            "type": "integer",
            "minimum": 1,
            "description": "Step number (1-based)"
          },
          "what": {
            "type": "string",
            "description": "What action to perform"
          },
          "why": {
            "type": "string",
            "description": "Why this step is needed (builds context)"
          },
          "when": {
            "type": "string",
            "description": "When or under what condition to perform this step"
          },
          "skip_if": {
            "type": "string",
            "description": "Condition to skip this step (optional)"
          },
          "how": {
            "type": "string",
            "description": "How to perform the action (command or instruction)"
          },
          "verify": {
            "type": "string",
            "description": "How to verify the step succeeded"
          },
          "comments": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Additional context or notes (optional)"
          }
        },
        "additionalProperties": false
      }
    },
    "step_count": {
      "type": "integer",
      "minimum": 1,
      "description": "Total number of steps (must match steps array length)"
    }
  },
  "additionalProperties": false
}

Prodaie Schema

prodaie schema 在 recipaie 的基础上扩展,用于按安装位置记录执行结果。它是运行 recipaie 所得的“产物”。

Schema 地址:

https://recipaie.com/schemas/prodaie.schema.json

结构

一份 prodaie 包含:

  • name

    - 必须与原始 recipaie 一致
  • locations - 安装位置数组,每个位置都有各自的执行结果

Location 结构

每个 location 包含:

字段说明

path

此实例所安装的文件路径或目录

description

这次具体安装的目的

status

执行状态:complete、partial 或 failed

steps

本次安装各步骤及其结果

step_count

步骤总数

步骤结果

除 recipaie 的步骤字段外,prodaie 的步骤还包含以下必填字段:

字段类型说明

success

boolean

若该步骤成功或被有意跳过,则为 true;失败则为 false

details

string对执行过程中所发生情况的说明

布尔字段 success 便于用程序检查每一步的结果,而 details 则给出可读的说明。

完整的 Schema JSON
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://recipaie.publifye.pro/prodaie.schema.json",
  "title": "Prodaie",
  "description": "Product of AI - a recipaie with execution results per installation location",
  "type": "object",
  "required": ["name", "locations"],
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Reference to the prodaie schema"
    },
    "name": {
      "type": "string",
      "description": "Name of the service or application"
    },
    "flavor": {
      "type": "string",
      "description": "Variant identifier matching the recipaie that was executed. Must match filename suffix: prodaie-{flavor}.json"
    },
    "description": {
      "type": "string",
      "description": "Brief description of what this recipe deploys"
    },
    "prerequisites": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Tools or conditions that must exist before starting"
    },
    "locations": {
      "type": "array",
      "description": "Installation locations with their individual execution results",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["path", "status", "steps", "step_count"],
        "properties": {
          "path": {
            "type": "string",
            "description": "File path or directory where this instance is installed"
          },
          "description": {
            "type": "string",
            "description": "Purpose of this specific installation"
          },
          "status": {
            "type": "string",
            "enum": ["complete", "partial", "failed"],
            "description": "Execution status for this installation"
          },
          "steps": {
            "type": "array",
            "description": "Ordered list of deployment steps with results for this installation",
            "items": {
              "type": "object",
              "required": ["order", "what", "why", "when", "how", "verify", "success", "details"],
              "properties": {
                "order": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "Step number (1-based)"
                },
                "what": {
                  "type": "string",
                  "description": "What action to perform"
                },
                "why": {
                  "type": "string",
                  "description": "Why this step is needed (builds context)"
                },
                "when": {
                  "type": "string",
                  "description": "When or under what condition to perform this step"
                },
                "skip_if": {
                  "type": "string",
                  "description": "Condition to skip this step (optional)"
                },
                "how": {
                  "type": "string",
                  "description": "How to perform the action (command or instruction)"
                },
                "verify": {
                  "type": "string",
                  "description": "How to verify the step succeeded"
                },
                "success": {
                  "type": "boolean",
                  "description": "Whether the step succeeded (true) or failed (false). Steps that were intentionally skipped are also true."
                },
                "details": {
                  "type": "string",
                  "description": "Explanation of what happened during execution"
                },
                "comments": {
                  "type": "array",
                  "items": { "type": "string" },
                  "description": "Additional context or notes (optional)"
                }
              },
              "additionalProperties": false
            }
          },
          "step_count": {
            "type": "integer",
            "minimum": 1,
            "description": "Total number of steps (must match steps array length)"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}