什么是 Recipaie?
Recipaie = recipe + AI + pie。写给 AI 助手的一小块(或完整的)配方——就像一块派:把简单的原料用心地组合起来。它不是机械化的自动化,而是情境化的指引。
一种 JSON 格式,用于引导 AI 处理 工具、流程 或两者兼有——用于 执行、理解 或两者兼有。您可以用它来部署软件,也可以把它当作上下文,让 AI 理解某样东西是如何运作的。每一步包含:
- what - 要执行的操作
- why - 用于决策的上下文
- when - 执行条件
- skip_if - 何时跳过(幂等性)
- how - 命令或操作说明
- verify - 成功与否的验证
示例
{
"name": "my-service",
"version": "1.0.0",
"steps": [{
"order": 1,
"what": "Create config directory",
"why": "Service needs config storage",
"when": "Before starting service",
"skip_if": "/opt/my-service exists",
"how": "mkdir -p /opt/my-service",
"verify": "ls -la /opt/my-service"
}],
"step_count": 1
}
两种格式
- Recipaie
- 配方模板——如何部署某样东西。
- Prodaie
- 执行记录——部署时实际发生了什么。
校验您的 JSON
使用我们的在线校验器,或通过 API 校验:
curl -X POST https://recipaie.com/api/validate \
-H "Content-Type: application/json" \
-d '{"schema_type":"recipaie","content":{...your JSON...}}'
或使用命令行工具进行不限次数的校验:
# Node.js
npx ajv validate -s https://recipaie.com/schemas/recipaie.schema.json -d your-file.json
# Python
pip install jsonschema
jsonschema -i your-file.json https://recipaie.com/schemas/recipaie.schema.json