Skip to content
rfc-workflow Artifact [48e2a7183d]
Login

Artifact [48e2a7183d]

Artifact 48e2a7183d3851f5784255dc0d22b0de9d3604f1240c4c97864e7559cca509f4:


{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.invalid/schemas/suite-discovery-contract.schema.json",
  "title": "RFC suite discovery workflow contract",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "contract_id",
    "contract_version",
    "name",
    "summary",
    "governing_rules",
    "required_inputs",
    "artifact_families",
    "visibility_classes",
    "roles",
    "artifact_types",
    "stage_order",
    "stage_graph",
    "stages",
    "correction_policy"
  ],
  "properties": {
    "$schema": {
      "const": "./schemas/suite-discovery-contract.schema.json"
    },
    "contract_id": {
      "const": "rfc-suite-discovery"
    },
    "contract_version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "summary": {
      "type": "string",
      "minLength": 1
    },
    "governing_rules": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/rule"
      }
    },
    "required_inputs": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "system-name",
        "authoritative-corpus",
        "informative-material",
        "observed-surfaces",
        "authority-rule"
      ],
      "properties": {
        "system-name": {
          "$ref": "#/$defs/inputSpec"
        },
        "authoritative-corpus": {
          "$ref": "#/$defs/inputSpec"
        },
        "informative-material": {
          "$ref": "#/$defs/inputSpec"
        },
        "observed-surfaces": {
          "$ref": "#/$defs/inputSpec"
        },
        "authority-rule": {
          "$ref": "#/$defs/inputSpec"
        }
      }
    },
    "artifact_families": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "handoff",
        "evidence"
      ],
      "properties": {
        "handoff": {
          "$ref": "#/$defs/artifactFamily"
        },
        "evidence": {
          "$ref": "#/$defs/artifactFamily"
        }
      }
    },
    "visibility_classes": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "operator-shared",
        "evidence-shared"
      ],
      "properties": {
        "operator-shared": {
          "$ref": "#/$defs/visibilityClass"
        },
        "evidence-shared": {
          "$ref": "#/$defs/visibilityClass"
        }
      }
    },
    "roles": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "controller",
        "corpus-analyst",
        "suite-designer",
        "pack-reviewer"
      ],
      "properties": {
        "controller": {
          "$ref": "#/$defs/role"
        },
        "corpus-analyst": {
          "$ref": "#/$defs/role"
        },
        "suite-designer": {
          "$ref": "#/$defs/role"
        },
        "pack-reviewer": {
          "$ref": "#/$defs/role"
        }
      }
    },
    "artifact_types": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "discovery-scope-note",
        "corpus-map",
        "normative-surface-inventory",
        "suite-boundary-decision",
        "pack-scaffold-inputs",
        "suite-discovery-brief"
      ],
      "properties": {
        "discovery-scope-note": {
          "$ref": "#/$defs/artifactType"
        },
        "corpus-map": {
          "$ref": "#/$defs/artifactType"
        },
        "normative-surface-inventory": {
          "$ref": "#/$defs/artifactType"
        },
        "suite-boundary-decision": {
          "$ref": "#/$defs/artifactType"
        },
        "pack-scaffold-inputs": {
          "$ref": "#/$defs/artifactType"
        },
        "suite-discovery-brief": {
          "$ref": "#/$defs/artifactType"
        }
      }
    },
    "stage_order": {
      "const": [
        "discovery-scope",
        "corpus-map",
        "surface-inventory",
        "suite-shaping",
        "handoff-packaging"
      ]
    },
    "stage_graph": {
      "$ref": "#/$defs/stageGraph"
    },
    "stages": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "discovery-scope",
        "corpus-map",
        "surface-inventory",
        "suite-shaping",
        "handoff-packaging"
      ],
      "properties": {
        "discovery-scope": {
          "$ref": "#/$defs/stage"
        },
        "corpus-map": {
          "$ref": "#/$defs/stage"
        },
        "surface-inventory": {
          "$ref": "#/$defs/stage"
        },
        "suite-shaping": {
          "$ref": "#/$defs/stage"
        },
        "handoff-packaging": {
          "$ref": "#/$defs/stage"
        }
      }
    },
    "correction_policy": {
      "$ref": "#/$defs/correctionPolicy"
    }
  },
  "$defs": {
    "rule": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "rule"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "rule": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "inputSpec": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "description"
      ],
      "properties": {
        "description": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "artifactFamily": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "publishable",
        "description",
        "must_include"
      ],
      "properties": {
        "publishable": {
          "type": "boolean"
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "must_include": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "visibilityClass": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "description",
        "readable_by"
      ],
      "properties": {
        "description": {
          "type": "string",
          "minLength": 1
        },
        "readable_by": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "controller",
              "corpus-analyst",
              "suite-designer",
              "pack-reviewer"
            ]
          }
        }
      }
    },
    "role": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "purpose",
        "can_read"
      ],
      "properties": {
        "purpose": {
          "type": "string",
          "minLength": 1
        },
        "can_read": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "operator-shared",
              "evidence-shared"
            ]
          }
        }
      }
    },
    "artifactType": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "family",
        "visibility",
        "description"
      ],
      "properties": {
        "family": {
          "type": "string",
          "enum": [
            "handoff",
            "evidence"
          ]
        },
        "visibility": {
          "type": "string",
          "enum": [
            "operator-shared",
            "evidence-shared"
          ]
        },
        "description": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "stageGraph": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "start_stage",
        "terminal_stages",
        "pass_edges"
      ],
      "properties": {
        "start_stage": {
          "const": "discovery-scope"
        },
        "terminal_stages": {
          "const": [
            "handoff-packaging"
          ]
        },
        "pass_edges": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "discovery-scope",
            "corpus-map",
            "surface-inventory",
            "suite-shaping",
            "handoff-packaging"
          ],
          "properties": {
            "discovery-scope": {
              "const": [
                "corpus-map"
              ]
            },
            "corpus-map": {
              "const": [
                "surface-inventory"
              ]
            },
            "surface-inventory": {
              "const": [
                "suite-shaping"
              ]
            },
            "suite-shaping": {
              "const": [
                "handoff-packaging"
              ]
            },
            "handoff-packaging": {
              "const": []
            }
          }
        }
      }
    },
    "stage": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "title",
        "owner_role",
        "support_roles",
        "depends_on_artifacts",
        "may_consume_artifacts",
        "entry_criteria",
        "advance_gate",
        "outputs",
        "next_stages",
        "repeatable"
      ],
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "discovery-scope",
            "corpus-map",
            "surface-inventory",
            "suite-shaping",
            "handoff-packaging"
          ]
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "owner_role": {
          "type": "string",
          "enum": [
            "controller",
            "corpus-analyst",
            "suite-designer",
            "pack-reviewer"
          ]
        },
        "support_roles": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "controller",
              "corpus-analyst",
              "suite-designer",
              "pack-reviewer"
            ]
          },
          "uniqueItems": true
        },
        "depends_on_artifacts": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "discovery-scope-note",
              "corpus-map",
              "normative-surface-inventory",
              "suite-boundary-decision",
              "pack-scaffold-inputs",
              "suite-discovery-brief"
            ]
          },
          "uniqueItems": true
        },
        "may_consume_artifacts": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "discovery-scope-note",
              "corpus-map",
              "normative-surface-inventory",
              "suite-boundary-decision",
              "pack-scaffold-inputs",
              "suite-discovery-brief"
            ]
          },
          "uniqueItems": true
        },
        "entry_criteria": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "advance_gate": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "outputs": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "discovery-scope-note",
              "corpus-map",
              "normative-surface-inventory",
              "suite-boundary-decision",
              "pack-scaffold-inputs",
              "suite-discovery-brief"
            ]
          },
          "uniqueItems": true
        },
        "next_stages": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "discovery-scope",
              "corpus-map",
              "surface-inventory",
              "suite-shaping",
              "handoff-packaging"
            ]
          },
          "uniqueItems": true
        },
        "repeatable": {
          "type": "boolean"
        }
      }
    },
    "correctionPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "rule",
        "route_by_root_artifact",
        "rerun_scope",
        "unresolved_questions_block_pack_scaffolding"
      ],
      "properties": {
        "rule": {
          "type": "string",
          "minLength": 1
        },
        "route_by_root_artifact": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "discovery-scope-note",
            "corpus-map",
            "normative-surface-inventory",
            "suite-boundary-decision",
            "pack-scaffold-inputs",
            "suite-discovery-brief"
          ],
          "properties": {
            "discovery-scope-note": {
              "const": "discovery-scope"
            },
            "corpus-map": {
              "const": "corpus-map"
            },
            "normative-surface-inventory": {
              "const": "surface-inventory"
            },
            "suite-boundary-decision": {
              "const": "suite-shaping"
            },
            "pack-scaffold-inputs": {
              "const": "handoff-packaging"
            },
            "suite-discovery-brief": {
              "const": "handoff-packaging"
            }
          }
        },
        "rerun_scope": {
          "const": "affected-downstream-stages-only"
        },
        "unresolved_questions_block_pack_scaffolding": {
          "type": "boolean"
        }
      }
    }
  }
}