handoff-protocol / contracts /handoff-packet.schema.json
LucioLiu's picture
Initial release - mirrors github.com/LucioLiu/handoff-protocol
f24bcdf verified
Raw
History Blame Contribute Delete
2.01 kB
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/LucioLiu/handoff-protocol/contracts/handoff-packet.schema.json",
"title": "Handoff packet",
"type": "object",
"additionalProperties": false,
"required": ["goal", "context_constraints", "acceptance_criteria", "known_pitfalls"],
"properties": {
"goal": {"type": "string", "minLength": 1},
"context_constraints": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
"acceptance_criteria": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
"known_pitfalls": {"type": "array", "items": {"type": "string", "minLength": 1}},
"handoff_id": {"type": "string", "minLength": 1},
"execution_mode": {
"description": "Host execution container only. Durable writes are governed separately by persistence_contract.",
"enum": ["bounded_subagent", "independent_task"],
"default": "bounded_subagent"
},
"continuity_required": {"type": "boolean", "default": false},
"allow_mode_degradation": {"type": "boolean", "default": false},
"persistence_contract": {
"description": "Durable artifact obligations, orthogonal to execution_mode. A bounded_subagent may carry required targets.",
"$ref": "persistence-contract.schema.json"
}
},
"allOf": [
{
"if": {
"properties": {"execution_mode": {"const": "independent_task"}},
"required": ["execution_mode"]
},
"then": {"required": ["persistence_contract"]}
},
{
"if": {
"properties": {"continuity_required": {"const": true}},
"required": ["continuity_required"]
},
"then": {
"properties": {"execution_mode": {"const": "independent_task"}},
"required": ["execution_mode", "handoff_id"]
}
},
{
"if": {"required": ["persistence_contract"]},
"then": {"required": ["handoff_id"]}
}
]
}