Добавить healthcheck контрактов Agent Reliability

This commit is contained in:
2026-05-24 13:00:14 +03:00
parent 06e035eadf
commit 0506def909
6 changed files with 831 additions and 0 deletions
@@ -0,0 +1,102 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Agent Issue Catalog",
"type": "object",
"additionalProperties": true,
"required": ["schema_version", "issues"],
"properties": {
"schema_version": {
"const": "agent_issue_catalog_v1"
},
"updated_at": {
"type": "string"
},
"principles": {
"type": "array",
"items": {
"type": "string"
}
},
"issues": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": true,
"required": [
"severity",
"business_meaning",
"root_layers",
"detectors",
"allowed_patch_targets",
"forbidden_patch_targets",
"rerun_matrix"
],
"properties": {
"severity": {
"type": "string",
"enum": ["P0", "P1", "P2", "P3", "WARNING"]
},
"business_meaning": {
"type": "string"
},
"root_layers": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"expected_answer_contract": {
"type": "string"
},
"detectors": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"allowed_patch_targets": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"forbidden_patch_targets": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"rerun_matrix": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"acceptance": {
"type": "object",
"additionalProperties": true,
"properties": {
"must_have": {
"type": "array",
"items": {
"type": "string"
}
},
"must_not_have": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
@@ -0,0 +1,107 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Auto-Coder Gate",
"type": "object",
"additionalProperties": true,
"required": [
"schema_version",
"allowed",
"mode",
"issue_codes",
"root_layers",
"allowed_patch_targets",
"forbidden_patch_targets",
"rerun_matrix",
"allowlisted_issue_codes",
"issue_catalog_contracts",
"blocking_reasons",
"reason",
"policy"
],
"properties": {
"schema_version": {
"const": "auto_coder_gate_v1"
},
"allowed": {
"type": "boolean"
},
"mode": {
"const": "auto-coder"
},
"focus_id": {
"type": ["string", "null"]
},
"issue_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"root_layers": {
"type": "array",
"items": {
"type": "string"
}
},
"allowed_patch_targets": {
"type": "array",
"items": {
"type": "string"
}
},
"forbidden_patch_targets": {
"type": "array",
"items": {
"type": "string"
}
},
"rerun_matrix": {
"type": "array",
"items": {
"type": "string"
}
},
"allowlisted_issue_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"issue_catalog_contracts": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": true,
"required": [
"root_layers",
"expected_answer_contract",
"allowed_patch_targets",
"forbidden_patch_targets",
"rerun_matrix"
]
}
},
"blocking_reasons": {
"type": "array",
"items": {
"type": "string"
}
},
"reason": {
"type": "string"
},
"policy": {
"type": "object",
"additionalProperties": true,
"required": [
"auto_coder_default",
"requires_issue_catalog_contract",
"requires_expected_answer_contract",
"requires_target_evidence_paths",
"requires_accepted_smoke_pack",
"requires_catalog_limited_patch_scope",
"lead_owns_merge_and_acceptance"
]
}
}
}
@@ -0,0 +1,119 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Business Audit Contract",
"type": "object",
"additionalProperties": true,
"required": [
"schema_version",
"created_at",
"overall_status",
"quality_score",
"target_score",
"loop_decision",
"analyst_accepted_gate",
"accepted_gate",
"deterministic_gate_ok",
"deterministic_gate_reason",
"human_meaning",
"quality_flags",
"root_layers",
"violated_invariants",
"blocking_issues",
"repair_targets_summary",
"rerun_matrix",
"artifact_refs"
],
"properties": {
"schema_version": {
"const": "business_audit_contract_v1"
},
"created_at": {
"type": "string"
},
"overall_status": {
"type": "string",
"enum": ["accepted", "partial", "blocked", "needs_exact_capability"]
},
"quality_score": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"target_score": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"loop_decision": {
"type": "string"
},
"analyst_accepted_gate": {
"type": "boolean"
},
"accepted_gate": {
"type": "boolean"
},
"deterministic_gate_ok": {
"type": "boolean"
},
"deterministic_gate_reason": {
"type": "string"
},
"human_meaning": {
"type": "object",
"additionalProperties": true
},
"quality_flags": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"root_layers": {
"type": "array",
"items": {
"type": "string"
}
},
"violated_invariants": {
"type": "array",
"items": {
"type": "string"
}
},
"blocking_issues": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"issue_code",
"severity",
"expected_business_answer_contract",
"root_layers",
"evidence_paths",
"minimal_patch_direction",
"allowed_patch_targets",
"forbidden_patch_targets",
"rerun_matrix"
]
}
},
"repair_targets_summary": {
"type": "object",
"additionalProperties": true
},
"rerun_matrix": {
"type": "array",
"items": {
"type": "string"
}
},
"artifact_refs": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
@@ -0,0 +1,140 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Domain Loop Lead Coder Handoff",
"type": "object",
"additionalProperties": true,
"required": [
"schema_version",
"repair_mode",
"created_at",
"loop_id",
"iteration_id",
"status",
"reason",
"quality_score",
"target_score",
"loop_decision",
"analyst_accepted_gate",
"accepted_gate",
"deterministic_gate_ok",
"deterministic_gate_reason",
"artifact_refs",
"issue_codes",
"rerun_matrix",
"human_meaning",
"root_cause_layers",
"violated_invariants",
"assigned_primary_focus",
"top_repair_targets",
"candidate_files",
"lead_instructions"
],
"properties": {
"schema_version": {
"const": "domain_loop_lead_coder_handoff_v1"
},
"repair_mode": {
"const": "lead-handoff"
},
"created_at": {
"type": "string"
},
"loop_id": {
"type": ["string", "null"]
},
"iteration_id": {
"type": "string"
},
"status": {
"type": "string"
},
"reason": {
"type": "string"
},
"quality_score": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"target_score": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"loop_decision": {
"type": "string"
},
"analyst_accepted_gate": {
"type": "boolean"
},
"accepted_gate": {
"type": "boolean"
},
"deterministic_gate_ok": {
"type": "boolean"
},
"deterministic_gate_reason": {
"type": "string"
},
"artifact_refs": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"issue_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"rerun_matrix": {
"type": "array",
"items": {
"type": "string"
}
},
"human_meaning": {
"type": "object",
"additionalProperties": true
},
"root_cause_layers": {
"type": "array",
"items": {
"type": "string"
}
},
"violated_invariants": {
"type": "array",
"items": {
"type": "string"
}
},
"assigned_primary_focus": {
"type": ["object", "null"]
},
"top_repair_targets": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"candidate_files": {
"type": "array",
"items": {
"type": "string"
}
},
"lead_instructions": {
"type": "array",
"items": {
"type": "string"
}
},
"auto_coder_gate": {
"type": "object",
"additionalProperties": true
}
}
}