AISA v2.0 / Technical documentation / handover-packet.schema.json
handover-packet.schema.json
JSON · 67 lines · 5,796 bytes · wiki path 10 Architecture/contracts/drafts/handover-packet.schema.json · download the raw file · cited from Contracts
Same folder: branch-set.schema.json · brief.schema.json · configuration-summary.schema.json · cross-repo-shape.schema.json · experience-entry.schema.json · normalised-arrival.schema.json · route-packet.schema.json · sign-out-document.schema.json · skill-manifest.schema.json · solution-packet.schema.json · stage-contract.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://aisa.ablera.com/contracts/drafts/handover-packet.schema.json",
"title": "Handover packet (Hd) — DRAFT inter-stage contract, both directions",
"x-status": "draft",
"description": "D139: inter-stage contracts are drafts — a small required core the platform validates, and an open body a case may extend (additionalProperties true). Agents § 5 and Stage Solution Take § 2: a handover asks another module for a changed system; the receiving root accepts (opens a sub-case in the same case) or rejects with a reason; it never hangs; the requesting case owns the customer-facing closure. Three shapes: request, response, completion.",
"oneOf": [ { "$ref": "#/$defs/Request" }, { "$ref": "#/$defs/Response" }, { "$ref": "#/$defs/Completion" } ],
"$defs": {
"module": { "type": "string", "enum": ["configuration", "support", "source"] },
"Request": {
"type": "object", "additionalProperties": true,
"required": ["shape", "from_case_id", "from_module", "to_module", "ask", "inherits", "done_means", "closure_owner", "gate_decision_id"],
"properties": {
"shape": { "const": "handover_request" },
"from_case_id": { "type": "string" },
"from_module": { "$ref": "#/$defs/module" },
"to_module": { "$ref": "#/$defs/module" },
"direction_key": { "type": "string", "description": "one of handovers.directions, e.g. support->source" },
"ask": { "type": "object", "required": ["what", "why", "kind"], "properties": {
"what": { "type": "string", "description": "what the receiving module is asked to change — a system, never a ticket forwarded" },
"why": { "type": "string", "description": "the mechanism established so far, one sentence, layer-named" },
"kind": { "type": "string", "enum": ["configuration_cell", "product_change", "tariff_correction", "code_defect", "stored_code", "ui_dependency", "new_process", "plugin", "schema", "turned_out_configuration"] } } },
"inherits": { "type": "object", "required": ["paper_refs", "grants_narrowed_to"], "properties": {
"paper_refs": { "type": "array", "items": { "type": "string" }, "description": "evidence papers the sub-case may read; never the requester's transcript" },
"grants_narrowed_to": { "type": "array", "items": { "type": "string" }, "description": "GRANTS.ID subset; reads only — the sub-case earns its own writes at its own gates" },
"handles_scope": { "type": "string", "enum": ["same_case"], "description": "the handle map is the parent case's; the sub-case is inside it" } } },
"done_means": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "what 'done' means for the REQUESTING case — checkable statements" },
"closure_owner": { "type": "string", "const": "requesting_case", "description": "the customer hears one voice" },
"clocks": { "type": "object", "properties": { "requester_resolution_due": { "type": "string", "format": "date-time" }, "escalate_after": { "type": "string", "description": "ISO-8601 duration — the requester's gate-escalation interval (PG-12)" } } },
"gate_decision_id": { "type": "string", "description": "the Hd GATE_DECISIONS.ID — prior human confirmation" }
}
},
"Response": {
"type": "object", "additionalProperties": true,
"required": ["shape", "request_ref", "outcome"],
"properties": {
"shape": { "const": "handover_response" },
"request_ref": { "type": "string" },
"outcome": { "type": "string", "enum": ["accepted", "rejected"] },
"sub_case_id": { "type": "string" },
"predicted_minutes": { "type": "number", "minimum": 0, "description": "the sub-case's predicted delivery time (D135) — its budget" },
"reject_reason": { "type": "string", "enum": ["out_of_scope", "missing_information", "wrong_module", "duplicate", "not_permitted"] },
"reject_detail": { "type": "string" },
"what_would_be_needed": { "type": "string" }
},
"allOf": [
{ "if": { "properties": { "outcome": { "const": "accepted" } } }, "then": { "required": ["sub_case_id", "predicted_minutes"] } },
{ "if": { "properties": { "outcome": { "const": "rejected" } } }, "then": { "required": ["reject_reason", "reject_detail"] } }
]
},
"Completion": {
"type": "object", "additionalProperties": true,
"required": ["shape", "sub_case_id", "result", "proof_level", "changed", "revert_path_ref"],
"properties": {
"shape": { "const": "handover_completion" },
"sub_case_id": { "type": "string" },
"result": { "type": "string", "enum": ["done", "partially_done", "not_done"] },
"proof_level": { "type": "string", "enum": ["structural", "priced", "reachable", "quoted", "issued", "verified", "none"] },
"result_paper_refs": { "type": "array", "items": { "type": "string" } },
"changed": { "type": "array", "items": { "type": "object", "required": ["environment", "system", "object", "write_log_id"], "properties": { "environment": { "type": "string" }, "system": { "type": "string" }, "object": { "type": "string" }, "write_log_id": { "type": "string" } } } },
"revert_path_ref": { "type": "string", "description": "the standing revert (WRITE_LOG teardown ids or the revert commit) — reversal stays a human decision (H7)" },
"done_means_checked": { "type": "array", "items": { "type": "object", "required": ["statement", "holds"], "properties": { "statement": { "type": "string" }, "holds": { "type": "boolean" } } } },
"remaining_for_requester": { "type": "array", "items": { "type": "string" } }
}
}
}
}