2026-09-29 00:24:05 +02:00
{
"$schema" : "https://json-schema.org/draft/2020-12/schema" ,
"$id" : "https://runbook-tutorials.invalid/schema/runbook-pack/v0.1" ,
"title" : "Runbook pack manifest" ,
"type" : "object" ,
2026-09-29 21:28:56 +02:00
"required" : [
"spec" ,
"id" ,
"title" ,
"owner" ,
"engine"
] ,
2026-09-29 00:24:05 +02:00
"additionalProperties" : false ,
"properties" : {
2026-09-29 21:28:56 +02:00
"spec" : {
"const" : "runbook-pack/v0.1"
} ,
"id" : {
"type" : "string" ,
"pattern" : "^[a-z0-9]+([.-][a-z0-9]+)*$"
} ,
"title" : {
"type" : "string" ,
"minLength" : 3
} ,
"owner" : {
"type" : "string" ,
"minLength" : 1 ,
"description" : "Repository that owns the procedure"
} ,
"outcome" : {
"type" : "string"
} ,
2026-09-29 00:24:05 +02:00
"exercise_status" : {
"type" : "string" ,
2026-09-29 21:28:56 +02:00
"deprecated" : true ,
"description" : "Deprecated and ignored. Maturity is derived from run history (docs/maturity-and-projects.md); old packs that still carry this field keep loading."
} ,
"engine" : {
"enum" : [
"native" ,
"legacy-command"
]
2026-09-29 00:24:05 +02:00
} ,
"legacy" : {
"type" : "object" ,
2026-09-29 21:28:56 +02:00
"required" : [
"command"
] ,
2026-09-29 00:24:05 +02:00
"additionalProperties" : false ,
"properties" : {
2026-09-29 21:28:56 +02:00
"command" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"minItems" : 1
} ,
"cwd" : {
"type" : "string"
} ,
"url" : {
"type" : "string"
} ,
"note" : {
"type" : "string"
}
}
} ,
"parameters" : {
"type" : "array" ,
"items" : {
"$ref" : "#/$defs/parameter"
2026-09-29 00:24:05 +02:00
}
} ,
2026-09-29 21:28:56 +02:00
"prerequisites" : {
"type" : "array" ,
"items" : {
"$ref" : "#/$defs/prerequisite"
}
} ,
"steps" : {
"type" : "array" ,
"items" : {
"$ref" : "#/$defs/step"
}
} ,
"threat_checks" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"ownership" : {
"type" : "array" ,
"items" : {
"$ref" : "#/$defs/ownership"
}
}
2026-09-29 00:24:05 +02:00
} ,
"allOf" : [
2026-09-29 21:28:56 +02:00
{
"if" : {
"properties" : {
"engine" : {
"const" : "native"
}
}
} ,
"then" : {
"required" : [
"steps" ,
"threat_checks"
]
}
} ,
{
"if" : {
"properties" : {
"engine" : {
"const" : "legacy-command"
}
}
} ,
"then" : {
"required" : [
"legacy"
]
}
}
2026-09-29 00:24:05 +02:00
] ,
"$defs" : {
"parameter" : {
"type" : "object" ,
2026-09-29 21:28:56 +02:00
"required" : [
"id" ,
"label" ,
"type"
] ,
2026-09-29 00:24:05 +02:00
"additionalProperties" : false ,
"properties" : {
2026-09-29 21:28:56 +02:00
"id" : {
"type" : "string" ,
"pattern" : "^[a-z][a-z0-9_]*$"
} ,
"label" : {
"type" : "string"
} ,
"type" : {
"enum" : [
"string" ,
"text" ,
"enum" ,
"path" ,
"bool" ,
"int"
]
} ,
"values" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"default" : {
"type" : [
"string" ,
"integer" ,
"boolean"
]
} ,
"pattern" : {
"type" : "string"
} ,
"help" : {
"type" : "string"
} ,
"secret" : {
"const" : false ,
"description" : "Parameters are never secret. Secrets are entered by the operator into the tool that owns them, never into the engine."
}
2026-09-29 00:24:05 +02:00
}
} ,
"prerequisite" : {
"type" : "object" ,
2026-09-29 21:28:56 +02:00
"required" : [
"text" ,
"owner"
] ,
2026-09-29 00:24:05 +02:00
"additionalProperties" : false ,
2026-09-29 21:28:56 +02:00
"properties" : {
"text" : {
"type" : "string"
} ,
"owner" : {
"type" : "string"
}
}
2026-09-29 00:24:05 +02:00
} ,
"check" : {
"type" : "object" ,
2026-09-29 21:28:56 +02:00
"required" : [
"done_when"
] ,
2026-09-29 00:24:05 +02:00
"additionalProperties" : false ,
"properties" : {
2026-09-29 21:28:56 +02:00
"done_when" : {
"type" : "string" ,
"minLength" : 3
} ,
"command" : {
"type" : "string"
} ,
"expect" : {
"enum" : [
"manual" ,
"exit-0" ,
"output-contains"
]
} ,
"contains" : {
"type" : "string"
}
2026-09-29 00:24:05 +02:00
}
} ,
"step" : {
"type" : "object" ,
2026-09-29 21:28:56 +02:00
"required" : [
"id" ,
"title" ,
"owner" ,
"verify"
] ,
2026-09-29 00:24:05 +02:00
"additionalProperties" : false ,
"properties" : {
2026-09-29 21:28:56 +02:00
"id" : {
"type" : "string" ,
"pattern" : "^[a-z][a-z0-9-]*$"
} ,
"title" : {
"type" : "string"
} ,
"owner" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"command" : {
"type" : "string" ,
"description" : "Template; {{param}} placeholders only"
} ,
"risk" : {
"enum" : [
"read-only" ,
"changes-state" ,
"attended" ,
"destructive"
] ,
"default" : "read-only"
} ,
"verify" : {
"$ref" : "#/$defs/check"
} ,
"rollback" : {
"type" : "string"
} ,
"evidence" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"description" : "Names of non-secret facts recorded when the step completes"
}
2026-09-29 00:24:05 +02:00
}
} ,
"ownership" : {
"type" : "object" ,
2026-09-29 21:28:56 +02:00
"required" : [
"concern" ,
"owner"
] ,
2026-09-29 00:24:05 +02:00
"additionalProperties" : false ,
2026-09-29 21:28:56 +02:00
"properties" : {
"concern" : {
"type" : "string"
} ,
"owner" : {
"type" : "string"
}
}
2026-09-29 00:24:05 +02:00
}
}
}