Bug Fixing
Repository continuity composition
For repository-scoped work, compose maintain-repository-continuity in
Resume mode before selecting work. After an authorized repository change
passes domain validation, compose Refresh and Verify immediately before
presenting the pull request, and include the reconciled root CONTINUITY.md in
the same change. A policy-permitted no-change or exemption result must be
documented instead of fabricating an edit.
- Contribute: Reproduction signal, root cause, bounded fix, regression protection, validation, and residual risk
- Never claim: That a defect is fixed, reviewed, or merged without the corresponding evidence
Purpose
Execute a bounded defect-correction workflow from reproduction through focused
validation while preserving behavior outside the broken invariant.
Required Inputs
Resolve as much of the following as possible:
- observed behavior, expected behavior, and failure evidence
- reproduction steps, environment, and scope
- affected code paths, tests, and recent relevant changes
- validation commands and repository constraints
- authorization boundaries, especially when diagnosis-only work was requested
Label missing reproduction evidence instead of masking it.
Workflow
establish the failure and reproduce it when feasible
diagnose the root cause without confusing symptoms for the underlying defect
choose the smallest safe correction that restores the intended invariant
add or update regression protection using:
./references/regression-checklist.md
./templates/BUG_FIX_REPORT.template.md
validate the focused fix with targeted tests and required broader checks
report reproduction evidence, root cause, the exact fix, residual risk, and any checks that could not run
Constraints
- Do not implement changes during a diagnosis-only request.
- Do not suppress errors, remove safeguards, or weaken tests merely to pass validation.
- Do not broaden the change set into unrelated refactors.
- Do not claim a bug is fixed without evidence from focused validation.
- Do not hide missing reproduction steps or ambiguous evidence.
Completion Criteria
Provenance
This canonical skill is first-party Ego Hygiene content curated from the staged
candidate at .staging/skills/bug-fixing/SKILL.md.
Source Delta
- Adopted: the staged reproduce -> diagnose -> minimal fix -> regression test
-> validate workflow and the explicit warning against unrelated refactors.
- Rewritten: canonical metadata, regression-focused resources, diagnosis-only
authorization handling, and deterministic eval coverage.
- Rejected: the narrower
diagnose overlap as a separate canonical identity for
this issue; diagnosis remains part of this workflow but must stay separate when
the request does not authorize implementation.
1---2name: bug-fixing3description: Reproduces, diagnoses, fixes, and validates a concrete software defect with the smallest safe change and regression protection. Use when a bug report, failing test, regression, crash, or incorrect behavior requires corrective engineering work.4license: MIT5---67# Bug Fixing89<!-- aether-continuity-disposition: reader-writer -->1011## Repository continuity composition1213For repository-scoped work, compose `maintain-repository-continuity` in14**Resume** mode before selecting work. After an authorized repository change15passes domain validation, compose **Refresh** and **Verify** immediately before16presenting the pull request, and include the reconciled root `CONTINUITY.md` in17the same change. A policy-permitted no-change or exemption result must be18documented instead of fabricating an edit.1920- **Contribute:** Reproduction signal, root cause, bounded fix, regression protection, validation, and residual risk21- **Never claim:** That a defect is fixed, reviewed, or merged without the corresponding evidence2223## Purpose2425Execute a bounded defect-correction workflow from reproduction through focused26validation while preserving behavior outside the broken invariant.2728## Required Inputs2930Resolve as much of the following as possible:3132- observed behavior, expected behavior, and failure evidence33- reproduction steps, environment, and scope34- affected code paths, tests, and recent relevant changes35- validation commands and repository constraints36- authorization boundaries, especially when diagnosis-only work was requested3738Label missing reproduction evidence instead of masking it.3940## Workflow41421. establish the failure and reproduce it when feasible432. diagnose the root cause without confusing symptoms for the underlying defect443. choose the smallest safe correction that restores the intended invariant454. add or update regression protection using:4647 - `./references/regression-checklist.md`48 - `./templates/BUG_FIX_REPORT.template.md`49505. validate the focused fix with targeted tests and required broader checks516. report reproduction evidence, root cause, the exact fix, residual risk, and any checks that could not run5253## Constraints5455- Do not implement changes during a diagnosis-only request.56- Do not suppress errors, remove safeguards, or weaken tests merely to pass validation.57- Do not broaden the change set into unrelated refactors.58- Do not claim a bug is fixed without evidence from focused validation.59- Do not hide missing reproduction steps or ambiguous evidence.6061## Completion Criteria6263- [ ] Reproduction or the strongest available proxy signal is explicit.64- [ ] The root cause is distinguished from symptoms.65- [ ] The code change is minimal and behavior-preserving outside the defect.66- [ ] Regression protection covers the broken behavior.67- [ ] Validation results and residual risk are reported truthfully.6869## Provenance7071This canonical skill is first-party Ego Hygiene content curated from the staged72candidate at `.staging/skills/bug-fixing/SKILL.md`.7374## Source Delta7576- Adopted: the staged reproduce -> diagnose -> minimal fix -> regression test77 -> validate workflow and the explicit warning against unrelated refactors.78- Rewritten: canonical metadata, regression-focused resources, diagnosis-only79 authorization handling, and deterministic eval coverage.80- Rejected: the narrower `diagnose` overlap as a separate canonical identity for81 this issue; diagnosis remains part of this workflow but must stay separate when82 the request does not authorize implementation.