Problem
A bug gets patched, but the real contract is still unclear, so the same bug comes back later.Outcome
You fix the bug and encode the expected behavior in spec, tests, and docs.High-level walkthrough
- Reproduce the bug with a failing test or clear failing command.
- Add or update the related spec requirement and scenario.
- Ask Codex to implement the minimum code change to satisfy the spec.
- Keep the regression test and update docs if behavior is user-facing.
- Run spec check and tests before merge.
Codex example prompt
Any coding agent prompt
Verify
- Confirm the regression test fails before the fix and passes after.
- Confirm the updated requirement is covered in verification.
- Confirm spec check passes.
- Confirm no unrelated behavior changed.