{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://loop-engineering.org/schema/loopnet-record-v1.json", "title": "LoopNet Record v1", "description": "Canonical schema for LoopNet dataset records: loop designs, trajectories, outcomes, and LES scores. Pins lss@1.0.0 and les@1.0.0 from 01-loop-engineering-core.", "type": "object", "additionalProperties": false, "required": [ "record_id", "schema_version", "spec_pins", "created_at", "source", "split", "patterns", "loop_name", "objective", "outcome", "termination_reason", "trajectory", "les_observed", "metadata" ], "properties": { "record_id": { "type": "string", "pattern": "^ln-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "description": "Stable LoopNet record identifier." }, "schema_version": { "type": "string", "const": "ln/record-v1" }, "spec_pins": { "type": "object", "additionalProperties": false, "required": ["lss", "les"], "properties": { "lss": { "type": "string", "const": "lss@1.0.0" }, "les": { "type": "string", "const": "les@1.0.0" } } }, "created_at": { "type": "string", "format": "date-time" }, "source": { "type": "string", "enum": ["synthetic", "case_study", "production_redacted", "community"] }, "split": { "type": "string", "enum": ["train", "val", "test"] }, "patterns": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/PatternSlug" }, "uniqueItems": true }, "loop_name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "minLength": 3, "maxLength": 64 }, "objective": { "type": "string", "minLength": 10 }, "loop_spec": { "type": "object", "description": "Optional LSS design snapshot (workers, evaluators, termination, cost_limits).", "additionalProperties": true }, "outcome": { "type": "string", "enum": ["success", "failure", "partial"] }, "termination_reason": { "$ref": "#/$defs/TerminationReason" }, "failure_modes": { "type": "array", "items": { "$ref": "#/$defs/FailureModeSlug" }, "uniqueItems": true }, "failure_mode": { "$ref": "#/$defs/FailureModeSlug", "description": "Primary failure label for supervised learning tasks." }, "trajectory": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "$ref": "#/$defs/Iteration" } }, "les_observed": { "$ref": "#/$defs/LesScore" }, "les_predicted": { "$ref": "#/$defs/LesScore" }, "metadata": { "$ref": "#/$defs/Metadata" }, "redaction": { "type": "object", "additionalProperties": false, "properties": { "level": { "type": "string", "enum": ["none", "basic", "full"] }, "fields_removed": { "type": "array", "items": { "type": "string" } } } }, "contributor": { "type": "object", "additionalProperties": false, "properties": { "handle": { "type": "string", "minLength": 1 }, "consent_id": { "type": "string", "minLength": 1 } } } }, "allOf": [ { "if": { "properties": { "outcome": { "const": "failure" } }, "required": ["outcome"] }, "then": { "required": ["failure_modes", "failure_mode"] } }, { "if": { "properties": { "outcome": { "const": "partial" } }, "required": ["outcome"] }, "then": { "required": ["failure_modes"] } } ], "$defs": { "PatternSlug": { "type": "string", "enum": [ "reflection-loop", "critique-loop", "planning-loop", "verification-loop", "research-loop", "simulation-loop", "debate-loop", "exploration-loop", "optimization-loop", "memory-augmented-loop", "human-in-the-loop", "safety-constrained-loop", "multi-agent-coordination", "recursive-improvement-loop" ] }, "FailureModeSlug": { "type": "string", "enum": [ "fail.open_loop", "fail.self_grade", "fail.evaluator_drift", "fail.tau_omission", "fail.false_pass", "fail.false_fail", "fail.oscillation", "fail.resource_bleed", "fail.state_corruption", "fail.orchestration_deadlock", "fail.meta_instability", "fail.safety_bypass" ] }, "TerminationReason": { "type": "string", "enum": [ "goal_met", "budget_exhausted", "human_stop", "error", "stall", "safety_violation", "timeout", "max_iterations", "cost_exceeded", "evaluator_error" ] }, "LesCategory": { "type": "string", "enum": [ "effectiveness", "speed", "cost", "robustness", "scalability", "safety", "adaptability", "autonomy" ] }, "LesScore": { "type": "object", "additionalProperties": false, "required": ["les_normalized", "categories"], "properties": { "les_normalized": { "type": "number", "minimum": 0, "maximum": 1 }, "les_display": { "type": "number", "minimum": 0, "maximum": 100 }, "categories": { "type": "object", "additionalProperties": false, "required": [ "effectiveness", "speed", "cost", "robustness", "scalability", "safety", "adaptability", "autonomy" ], "properties": { "effectiveness": { "type": "number", "minimum": 0, "maximum": 1 }, "speed": { "type": "number", "minimum": 0, "maximum": 1 }, "cost": { "type": "number", "minimum": 0, "maximum": 1 }, "robustness": { "type": "number", "minimum": 0, "maximum": 1 }, "scalability": { "type": "number", "minimum": 0, "maximum": 1 }, "safety": { "type": "number", "minimum": 0, "maximum": 1 }, "adaptability": { "type": "number", "minimum": 0, "maximum": 1 }, "autonomy": { "type": "number", "minimum": 0, "maximum": 1 } } }, "partial": { "type": "boolean", "description": "True when LES computed with fewer than 8 categories (e.g. missing perturbation data)." } } }, "Iteration": { "type": "object", "additionalProperties": false, "required": ["iteration", "goal_score", "cost_usd", "latency_seconds"], "properties": { "iteration": { "type": "integer", "minimum": 1 }, "goal_score": { "type": "number", "minimum": 0, "maximum": 1 }, "cost_usd": { "type": "number", "minimum": 0 }, "latency_seconds": { "type": "number", "minimum": 0 }, "tokens": { "type": "integer", "minimum": 0 }, "primary_quality": { "type": "number", "minimum": 0, "maximum": 1 }, "failure_codes": { "type": "array", "items": { "$ref": "#/$defs/FailureModeSlug" }, "uniqueItems": true }, "safety_events": { "type": "integer", "minimum": 0 }, "human_intervention": { "type": "boolean" } } }, "Metadata": { "type": "object", "additionalProperties": false, "required": [ "iteration_count", "cost_total_usd", "goal_target", "goal_final" ], "properties": { "iteration_count": { "type": "integer", "minimum": 1 }, "cost_total_usd": { "type": "number", "minimum": 0 }, "goal_target": { "type": "number", "minimum": 0, "maximum": 1 }, "goal_final": { "type": "number", "minimum": 0, "maximum": 1 }, "worker_count": { "type": "integer", "minimum": 1 }, "evaluator_count": { "type": "integer", "minimum": 1 }, "max_iterations_budget": { "type": "integer", "minimum": 1 }, "regression_count": { "type": "integer", "minimum": 0 }, "tags": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } } } }