今すぐ始める

Playbook を書く

agent が判断でき、人がレビューできる Definition を作ります。


良い Playbook は実行 graph ではなく、目的、入力、判断可能な Step、期待する成果を記述します。

{
	"ownerId": "<account-id>",
	"acl": ["<user-or-project-id>"],
	"definition": {
		"schemaVersion": 1,
		"title": "Release review",
		"description": "Review a release before publication.",
		"category": "operations",
		"inputSchema": {
			"type": "object",
			"properties": { "repository": { "type": "string" } },
			"required": ["repository"]
		},
		"steps": [
			{
				"title": "Inspect the change",
				"instructions": "Review scope, tests, risks, and rollback plan.",
				"resourceHints": [
					{ "kind": "document", "ref": "https://example.com/release-policy" }
				],
				"expectedOutputs": [{ "kind": "review", "description": "Evidence and decision" }]
			}
		]
	}
}

Step は小さな命令の列ではなく、成果を判断できるまとまりにします。credential や期限付き署名 URL を resource ref へ入れないでください。新規作成時は Step ID を省略し、Version 更新時は同じ論理 Step だけ既存の4文字 ID を維持します。

対応 category は productivity、programming、design、sales、marketing、operations、learning です。inputSchema は root が object の JSON Schema Draft 2020-12です。