Investigate
Run a linear diagnosis loop for unclear failures.
Workflow
- Capture symptom, scope, and reproduction context.
- Gather evidence from logs, errors, and changed files.
- Rank top hypotheses and map them to validation checks.
- Run the anti-rationalization gate: each root-cause claim needs supporting evidence, a falsification check, and at least one rejected alternative. If confidence is low, run a targeted probe before proposing a fix.
- Run required checks from
../_shared/quality-gates.md. - Decide most likely root cause and gate result.
- Write artifact to
.reports/codex/investigate/<timestamp>/result.json.
Output Contract
Use shared gate schema from ../_shared/quality-gates.md.
Minimum artifact payload:
{
"status": "pass|fail",
"checks_run": [
"lint",
"format",
"types",
"tests",
"review"
],
"checks_failed": [],
"findings": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0
},
"confidence": 0.0,
"artifact_path": ".reports/codex/investigate/<timestamp>/result.json"
}