Add quality criteria registry
This commit is contained in:
parent
f029d6bba9
commit
a9baf5ae52
15 changed files with 629 additions and 7 deletions
|
|
@ -502,6 +502,48 @@ class ReviewDecisionResponse(BaseModel):
|
|||
created_at: str
|
||||
|
||||
|
||||
class QualityCriterionResponse(BaseModel):
|
||||
id: str
|
||||
title: str
|
||||
category: str
|
||||
severity: str
|
||||
applies_to: list[str]
|
||||
description: str
|
||||
deterministic_action: str
|
||||
deterministic_action_when: str
|
||||
reviewer_guidance: str
|
||||
agentic_guidance: str = ""
|
||||
examples: list[str] = Field(default_factory=list)
|
||||
|
||||
model_config = {
|
||||
"json_schema_extra": {
|
||||
"examples": [
|
||||
{
|
||||
"id": "RREG-QC-002",
|
||||
"title": "Native Utility Is Repo-Owned",
|
||||
"category": "native-utility",
|
||||
"severity": "high",
|
||||
"applies_to": ["ability", "capability"],
|
||||
"description": "Owned claims require product evidence.",
|
||||
"deterministic_action": "downgraded",
|
||||
"deterministic_action_when": "Evidence is dependency-only.",
|
||||
"reviewer_guidance": "Check whether the repo owns the utility.",
|
||||
"agentic_guidance": "Approve only with product and source evidence.",
|
||||
"examples": ["Dependency use is not native product behavior."],
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class QualityCriteriaRegistryResponse(BaseModel):
|
||||
schema_version: str
|
||||
criteria_version: str
|
||||
status: str
|
||||
updated_at: str
|
||||
criteria: list[QualityCriterionResponse]
|
||||
|
||||
|
||||
class ObservedFactResponse(BaseModel):
|
||||
id: int
|
||||
repository_id: int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue