Prompt file imported from ibukani/iris-mind (
.codex/prompts/fix-bug.md). Copyright stays with the author.
Codex Prompt: Fix Bug
Read AGENTS.md first.
Discovery requirement
Treat the user request and any listed files as initial investigation targets, not a complete scope.
Before editing:
- Search for references to target classes/functions/config keys.
- Inspect import sites and call sites.
- Inspect related tests.
- Inspect configuration, registration, and runtime entrypoints.
- Look for parallel, legacy, deprecated, or similarly named implementations.
- Identify whether additional files must be read or changed.
- Report whether the initial assumptions were sufficient.
Do not assume the listed files are sufficient.
Task
Fix the described bug.
Bug-fix workflow
- Reproduce or reason to the failing path.
- Identify the smallest responsible unit.
- Add a failing test when practical.
- Fix the bug.
- Verify the test passes.
- Check nearby edge cases.
Rules
- Do not rewrite unrelated code.
- Do not weaken tests.
- Do not hide the bug with mocks.
- If the issue is environment-dependent, report the dependency or condition clearly.
Validation
python -m compileall -q iris tests
uv run pytest tests/ -q
uv run ruff check .
uv run ruff format --check .
uv run mypy .