Optimize
Run a linear optimization loop.
Workflow
- Define target metric and guard metric.
- Capture baseline measurement.
- Apply one minimal optimization change.
- Re-measure and compare against baseline and guards.
- Decide gate result (
passorfail). - Write artifact to
.reports/codex/optimize/<timestamp>/result.json.
Output Contract
Use shared gate schema from ../_shared/quality-gates.md.
Minimum artifact payload:
{
"status": "pass|fail",
"checks_run": [
"tests",
"review"
],
"checks_failed": [],
"findings": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0
},
"confidence": 0.0,
"artifact_path": ".reports/codex/optimize/<timestamp>/result.json"
}