Spec 1.0: This example uses the current stable portable core release.Use this when production behavior is wrong and you need a safe, repeatable fix.
Goal
Fix the bug and make the intended behavior explicit enough that the same regression is harder to reintroduce.Recommended loop
- Reproduce the bug with a failing test or another clear failing check.
- Implement the smallest safe fix.
- Keep the regression test.
- If you are entering an existing repo or branch, get context first. In
specled_ex, that ismix spec.prime --base HEAD. - Run the guided reconcile step. In
specled_ex, that ismix spec.next --bugfix. - If the current subject already states the intended behavior, keep the test and tighten a scenario only when the wording is ambiguous.
- If the intended behavior is missing, update the requirement or scenario before merge.
- Update docs if the behavior is user-facing.
- Run the strict check before merge. In
specled_ex, that ismix spec.check --base HEAD.
Prompt you can give an agent
Why this works
A bug fix is one of the best times to use Spec Led Development because the intended effect is usually very clear:- this behavior was wrong
- this behavior should now stay true
- this test or command proves it
What to keep small
- one requirement or one scenario update
- one regression path
- one bounded code change
Avoid
- bundling cleanup and refactors into the same change
- fixing adjacent issues without updating the spec boundary
- merging a bug fix that only changes code but not the stated contract
Good outcome
The bug-fix loop is complete when:- the failing behavior is now described clearly
- the regression is covered by a test or command
- the verification loop passes
- the team can point to one place in the repo that states the intended effect