How should we approach estimation when it comes to bugs?

How should we approach estimation when it comes to bugs?
Bugs from the future are invading my world, digital art (DALL-E)
Priority bugs should take priority over planned sprints, and the sprint should be adjusted accordingly (i.e. backlog items removed and rescheduled)

I recently updated our bug classification guide to include this statement about P1 bugs, which prompted the question:

How should we approach estimation when it comes to bugs?

I estimate bugs in the same way as any other item in the sprint backlog – a best effort based on perceived complexity and effort.

However – the underlying issue here is how often sprint backlogs need to be adjusted to account for variability. If you find yourself regularly shuffling backlog items or not delivering on your sprint goal due to reactive/unplanned work, you're probably over-planning your sprints.

Building slack into sprint planning

In a variable system, efficiency decreases exponentially as utilisation increases. Beyond around 80% utilisation, queue time increases dramatically and your ability to take on new work effectively stands still.

Instead of optimising for 100% utilisation towards roadmap contribution, I like to aim for 80% utilisation and implement a separate prioritised backlog of items which still deliver value, but aren't time-sensitive. This approach helps to ensure we're delivering smaller iterations faster, with capacity in reserve to absorb any unexpected additional issues.

Efficiency is the Enemy - Farnam Street
If you ever find yourself stressed, overwhelmed, sinking into stasis despite wanting to change, or frustrated when you can’t respond to new opportunities, you need more slack in your life. Here’s how slack works and why you need more of it.
The case for slacking off at work
The word agile is pretty frustrating. Not because it’s the wrong word, but because it’s been so badly coopted it longer means anything. At the heart of it, Agile software development is simply the practice of executing work in small batches, measuring the impact quickly, and then starting a new
How Does Utilization Impact Lead-time of Work?
Does system utilization impact the amount of time it takes to complete work? This notebook examines the impact of utilization and suggests ways to minimize that impact. Kingman’s Approximation is a mathematical formula use to estimate the queue time (which is in addition to the work time) in a syste…