fluid-core/schemas/backend-requirement.schema.json
tegwick fbbf56df7a Add FLUID wire contract schemas
Nine JSON Schemas covering the five record types from the schema spec,
plus backend requirements, feedback, the revision descriptor, routing
policy and the telemetry envelope. These are the integration boundary:
readable without any fluid-core code, so adapters may be written in any
language.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014KmVxhJ35tCo7rE7UnLwWu

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 1116572@bnt-lap001
Assistant-Session: 8ba9bb93-a72a-4883-b189-2499cce5c400
2026-09-04 01:55:47 +02:00

83 lines
3.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://fluid.dev/schemas/backend-requirement.schema.json",
"title": "FLUID backend capability requirement",
"description": "Capability the interface needs but has no authority to build. FLUID escalates rather than crossing the boundary (FluidAPIStandards.md section 30).",
"type": "object",
"properties": {
"fluid_backend_requirement": {
"type": "object",
"properties": {
"schema_version": { "$ref": "common.schema.json#/$defs/schemaVersion" },
"id": { "$ref": "common.schema.json#/$defs/backendRequirementId" },
"originating_interface": { "$ref": "common.schema.json#/$defs/interfaceId" },
"originating_revision": { "oneOf": [{ "$ref": "common.schema.json#/$defs/revisionId" }, { "type": "null" }] },
"originating_hypothesis": { "oneOf": [{ "$ref": "common.schema.json#/$defs/hypothesisId" }, { "type": "null" }] },
"backend_service": { "type": "string", "minLength": 1 },
"capability": {
"type": "object",
"properties": {
"title": { "type": "string", "minLength": 1 },
"description": { "type": "string", "minLength": 1 }
},
"required": ["title", "description"],
"additionalProperties": false
},
"semantics": {
"type": "object",
"properties": {
"consistency": { "type": "string" },
"required_fields": { "type": "array", "items": { "type": "string" } }
},
"additionalProperties": true
},
"quality": {
"type": "object",
"properties": {
"p95_latency_ms": { "type": "number", "minimum": 0 },
"availability": { "$ref": "common.schema.json#/$defs/unitInterval" }
},
"additionalProperties": true
},
"security": {
"type": "object",
"properties": {
"authorization_scope": { "type": "string" },
"tenant_isolation": { "type": "string" }
},
"additionalProperties": true
},
"expected_usage": {
"type": "object",
"properties": {
"requests_per_day": { "type": "integer", "minimum": 0 }
},
"additionalProperties": true
},
"urgency": { "enum": ["LOW", "MEDIUM", "HIGH"] },
"disposition": {
"type": "object",
"description": "The backend decides. Repeated OUT_OF_SCOPE feeds boundary learning (ArchitectureBlueprint.md section 22).",
"properties": {
"state": { "enum": ["OPEN", "ACCEPTED", "PLANNED", "AVAILABLE", "PARTIALLY_AVAILABLE", "OUT_OF_SCOPE", "REJECTED", "SUPERSEDED"] },
"reason": { "type": ["string", "null"] },
"target_ref": { "type": ["string", "null"] }
},
"required": ["state"],
"additionalProperties": false
}
},
"required": ["schema_version", "id", "originating_interface", "backend_service", "capability", "disposition"],
"additionalProperties": false
}
},
"required": ["fluid_backend_requirement"],
"additionalProperties": false
}