Strategic Fixing And Refactoring
Definition
Apply focused fixes that make the feature correct and understandable. Invest in design where it reduces real complexity for this feature, and defer unrelated cleanup.
Questions To Ask
- Which failing behavior or review finding must be fixed before delivery?
- What is the smallest change that fixes the cause, not just the symptom?
- Does a refactor reduce complexity enough to justify itself now?
- Could this fix accidentally change unrelated behavior?
- Which follow-up should be documented instead of bundled?
Existing Project Comparison
- Reuse existing abstractions and test patterns.
- Fix duplicated rules by moving them toward the owner module.
- Avoid broad rewrites, opportunistic cleanup, and formatting churn outside touched areas.
Suggestive Plan
- Classify each issue as must-fix, document, or defer.
- Fix the highest-risk behavioral issue first.
- Refactor only where it clarifies ownership, hides information, or removes duplication.
- Re-run the relevant verification.
- Update
FEATURE_DELIVERY.mdwith fixes and deferred work.
Example
If resend permissions are duplicated in route and service, move the rule into the service, keep the route thin, and add a regression test for unauthorized resend.
Vocabulary
- Root cause: underlying design or logic reason a failure happened.
- Refactor: behavior-preserving change that improves structure.
- Deferred work: useful but nonblocking change intentionally left out.
- Tactical fix: symptom patch that adds future maintenance cost.
Expected Outcome
Produce focused fixes and refactors that resolve blocking issues, preserve scope, improve or maintain design quality, and update verification notes.