AISA v2.0 / Technical documentation / stage-contract.schema.json
stage-contract.schema.json
JSON · 23 lines · 2,793 bytes · wiki path 10 Architecture/contracts/drafts/stage-contract.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 · handover-packet.schema.json · normalised-arrival.schema.json · route-packet.schema.json · sign-out-document.schema.json · skill-manifest.schema.json · solution-packet.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://aisa.ablera.com/contracts/drafts/stage-contract.schema.json",
"title": "Stage contract — DRAFT (the shape every stage of every module declares)",
"x-status": "draft",
"description": "Configuration Module § 7.1–7.6, generalised (Home: 'a common frame the modules instantiate — not mandatory rails'). What a stage consumes, what it produces, which skill proves it, which gates it fires and which proof rung it can reach. The stage set of a case type is a list of these (CASE_TYPES.STAGE_SET). Required core only; a module adds fields (D139).",
"type": "object", "additionalProperties": true,
"required": ["module", "stage_id", "name", "profile_key", "consumes", "produces", "proves_with", "gates", "proof_levels", "memory_domain"],
"properties": {
"module": { "type": "string", "enum": ["configuration", "support", "source"] },
"stage_id": { "type": "string", "pattern": "^S[0-9]{1,2}[a-z]?$" },
"name": { "type": "string" },
"profile_key": { "type": "string" },
"consumes": { "type": "array", "items": { "type": "object", "required": ["artefact", "contract"], "properties": { "artefact": { "type": "string" }, "contract": { "type": "string", "description": "the schema it is validated against, e.g. drafts/configuration-summary.schema.json" }, "from_stage": { "type": "string" } } } },
"produces": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["artefact", "contract"], "properties": { "artefact": { "type": "string" }, "contract": { "type": "string" }, "paper_kind": { "type": "string" } } } },
"proves_with": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "skill keys — a stage tests itself by skill, never by reading output" },
"gates": { "type": "array", "items": { "type": "object", "required": ["kind", "when"], "properties": { "kind": { "type": "string", "enum": ["H1", "H2", "H3", "H4", "H5", "H6", "H7", "Hd", "HW-approve", "HW-instance", "HW-shared", "HW-irreversible", "HW-ddl", "H5-SIM", "H5-send", "CG-11", "publish"] }, "when": { "type": "string", "enum": ["entry", "before_write", "exit", "on_problem", "on_dead_end"] } } } },
"proof_levels": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": ["structural", "priced", "reachable", "quoted", "issued", "verified"] }, "description": "the rungs this stage can reach; it reports the one reached, never higher (CR-3)" },
"memory_domain": { "type": "string" },
"iterates_until": { "type": "string", "default": "the human is satisfied at its exit gate" },
"parallel_with": { "type": "array", "items": { "type": "string" }, "description": "stages that run beside this one (phase 2A ‖ 2B, D75)" }
}
}