docs: slim refactor guidelines
docs: strengthen high-risk refactor guidance
docs: strengthen high-risk refactor guidance
docs: add Patterns F/G/H for imperative, async, and singleton refactors
Expand refactoring guidelines with three new extraction patterns derived
from analysis of navigation-manager.ts, user-storage.ts, and
context.service.ts — the highest-risk files in the codebase.
- Pattern F: Imperative resource manager extraction (RAF, timers, DOM)
- Pattern G: Async state machine decomposition (queues, guards, debounce)
- Pattern H: Singleton-to-injectable migration (static class → DI)
- Appendix: Timing Contract Inventory and Cross-System Invariant Map
- Updated troubleshooting, emergency stops, planning template, and
complexity table to reference new patterns
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updated High Risk Refactor Guidelines (markdown)
Updated High Risk Refactor Guidelines (markdown)
Created High Risk Refactor Guidelines (markdown)