Test fixture
Code transformation while preserving behavior and intent.
The model receives the prompt (and optional system message). The run uses scorer rubric_json_metrics with the JSON configuration below. Pass/fail and partial credit are determined entirely by that scorer against the model output; no human grading.
Return JSON only with keys plan, refactor, tests. Three modules repeat slightly different date formatting snippets for audit logs. Extract shared behavior while keeping caller-specific labels.
{
"metrics": {
"intent": {
"checks": [
{
"contains": [
"duplicate date formatting"
]
},
{
"contains": [
"shared helper"
]
},
{
"contains": [
"audit logs"
]
}
]
},
"visible": {
"checks": [
{
"contains": [
"three modules"
]
},
{
"contains": [
"caller-specific labels"
]
},
{
"contains": [
"same format"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"unit tests"
]
},
{
"contains": [
"timezone"
]
},
{
"contains": [
"no behavior change"
]
}
]
}
}
}temperature
0
max_tokens
500
timeout (s)
120
type
scored
file
refactor-date-format-helper.json