moicle 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,923 @@
1
+ ---
2
+ name: deprecation
3
+ description: Deprecation workflow for safely removing features or code. Use when deprecating, removing features, sunsetting functionality, or when user says "deprecate", "remove feature", "sunset", "phase out", "delete feature".
4
+ ---
5
+
6
+ # Deprecation Workflow
7
+
8
+ Systematic workflow for safely deprecating and removing features or code without breaking user workflows.
9
+
10
+ ## IMPORTANT: Read Architecture First
11
+
12
+ **Before deprecating anything, you MUST read the appropriate architecture reference:**
13
+
14
+ ### Global Architecture Files
15
+ ```
16
+ ~/.claude/architecture/
17
+ ├── clean-architecture.md # Core principles for all projects
18
+ ├── flutter-mobile.md # Flutter + Riverpod
19
+ ├── react-frontend.md # React + Vite + TypeScript
20
+ ├── go-backend.md # Go + Gin
21
+ ├── laravel-backend.md # Laravel + PHP
22
+ ├── remix-fullstack.md # Remix fullstack
23
+ └── monorepo.md # Monorepo structure
24
+ ```
25
+
26
+ ### Project-specific (if exists)
27
+ ```
28
+ .claude/architecture/ # Project overrides
29
+ ```
30
+
31
+ **Understand dependencies and impact before deprecating.**
32
+
33
+ ## Recommended Agents
34
+
35
+ | Phase | Agent | Purpose |
36
+ |-------|-------|---------|
37
+ | IDENTIFY | `@refactor` | Analyze dependencies and impact |
38
+ | IDENTIFY | `@code-reviewer` | Find all usages |
39
+ | PLAN | `@clean-architect` | Migration strategy |
40
+ | PLAN | `@api-designer` | API versioning (if applicable) |
41
+ | PLAN | `@docs-writer` | Deprecation notices |
42
+ | MIGRATE | `@react-frontend-dev`, `@go-backend-dev`, `@laravel-backend-dev`, `@flutter-mobile-dev`, `@remix-fullstack-dev` | Stack-specific migration |
43
+ | VERIFY | `@test-writer` | Migration tests |
44
+ | VERIFY | `@code-reviewer` | Final review |
45
+
46
+ ## Workflow Overview
47
+
48
+ ```
49
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
50
+ │1. IDENTIFY──▶│ 2. PLAN │──▶│3. MIGRATE│──▶│ 4. REMOVE│──▶│5. VERIFY │
51
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
52
+ │ │ │ │
53
+ │ Timeline: │ │ │
54
+ │ ┌──────────────────────────────────┴──────────────┘
55
+ │ │
56
+ ▼ ▼
57
+ Announce → Warn → Migrate → Remove → Monitor
58
+ (T-90) (T-60) (T-30) (T-0) (T+30)
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Phase 1: IDENTIFY
64
+
65
+ **Goal**: Identify what to deprecate and its full impact
66
+
67
+ ### Actions
68
+
69
+ 1. **Identify project stack and read architecture doc**
70
+
71
+ 2. Define what to deprecate:
72
+ - [ ] Feature/module/API/class/method
73
+ - [ ] Reason for deprecation
74
+ - [ ] Alternative solution (if any)
75
+
76
+ 3. Analyze dependencies:
77
+ ```bash
78
+ # Find all usages (adjust per stack)
79
+
80
+ # TypeScript/JavaScript
81
+ grep -r "deprecatedFunction" --include="*.ts" --include="*.tsx" --include="*.js"
82
+
83
+ # Go
84
+ grep -r "DeprecatedFunc" --include="*.go"
85
+
86
+ # PHP
87
+ grep -r "deprecatedMethod" --include="*.php"
88
+
89
+ # Dart
90
+ grep -r "deprecatedWidget" --include="*.dart"
91
+ ```
92
+
93
+ 4. Identify stakeholders:
94
+ - [ ] Internal teams using this
95
+ - [ ] External users/customers
96
+ - [ ] Third-party integrations
97
+ - [ ] Documentation references
98
+
99
+ 5. Assess impact based on architecture:
100
+ - [ ] Which layers affected (from architecture doc)
101
+ - [ ] Dependencies between layers
102
+ - [ ] Breaking change severity
103
+ - [ ] Migration complexity
104
+
105
+ 6. Check version control history:
106
+ ```bash
107
+ git log --oneline --all -- [deprecated-file]
108
+ git blame [deprecated-file]
109
+ ```
110
+
111
+ ### Output
112
+ ```markdown
113
+ ## Deprecation Analysis
114
+
115
+ ### Stack & Architecture
116
+ - Stack: [Flutter/React/Go/Laravel/Remix]
117
+ - Architecture Doc: [path to doc]
118
+
119
+ ### What to Deprecate
120
+ - Type: [Feature/API/Class/Method/Module]
121
+ - Name: [full name/path]
122
+ - Reason: [why deprecating]
123
+
124
+ ### Alternative Solution
125
+ - Recommended: [new approach]
126
+ - Migration path: [how to migrate]
127
+
128
+ ### Usage Analysis
129
+ - Internal usages: [count] in [locations]
130
+ - External usages: [estimated count]
131
+ - Dependencies: [list affected modules]
132
+
133
+ ### Affected Layers (from architecture)
134
+ - Layer 1: [impact description]
135
+ - Layer 2: [impact description]
136
+
137
+ ### Stakeholders
138
+ - Teams: [list]
139
+ - External users: [estimated]
140
+ - Integrations: [list]
141
+
142
+ ### Impact Assessment
143
+ - Breaking change: [Yes/No]
144
+ - Severity: [Critical/High/Medium/Low]
145
+ - Migration effort: [High/Medium/Low]
146
+ - Risk: [High/Medium/Low]
147
+ ```
148
+
149
+ ### Gate
150
+ - [ ] Architecture doc read
151
+ - [ ] Deprecation target identified
152
+ - [ ] All usages found
153
+ - [ ] Impact assessed
154
+ - [ ] Stakeholders identified
155
+ - [ ] Alternative exists (or valid reason for removal)
156
+
157
+ ---
158
+
159
+ ## Phase 2: PLAN
160
+
161
+ **Goal**: Create migration plan and timeline
162
+
163
+ ### Actions
164
+
165
+ 1. **Re-read architecture doc** for migration patterns
166
+
167
+ 2. Choose deprecation strategy:
168
+
169
+ **Soft Deprecation** (Gradual):
170
+ - Mark as deprecated with warnings
171
+ - Provide alternative
172
+ - Keep functional during grace period
173
+ - Remove later
174
+
175
+ **Hard Deprecation** (Immediate):
176
+ - Breaking change in next major version
177
+ - Force migration
178
+ - Use for security/critical issues
179
+
180
+ 3. Define timeline:
181
+ ```
182
+ Recommended timelines:
183
+
184
+ Internal APIs:
185
+ - Announce: Now
186
+ - Warning: +2 weeks
187
+ - Removal: +4-6 weeks
188
+
189
+ Public APIs:
190
+ - Announce: Now
191
+ - Warning: +1 version (minor)
192
+ - Removal: +1 version (major)
193
+ - Total: 3-6 months minimum
194
+
195
+ Critical security issues:
196
+ - Announce: Now
197
+ - Removal: Next patch/ASAP
198
+ ```
199
+
200
+ 4. Create migration guide:
201
+ - [ ] What's being deprecated
202
+ - [ ] Why it's being deprecated
203
+ - [ ] What to use instead
204
+ - [ ] How to migrate (step-by-step)
205
+ - [ ] Code examples (before/after)
206
+ - [ ] Automated migration tools (if possible)
207
+
208
+ 5. Plan communication:
209
+ - [ ] Changelog entry
210
+ - [ ] Release notes
211
+ - [ ] Email notifications (if external)
212
+ - [ ] Documentation updates
213
+ - [ ] In-code warnings
214
+
215
+ 6. Identify risks and mitigation:
216
+ - [ ] Users won't migrate → Extend timeline
217
+ - [ ] No alternative exists → Build it first
218
+ - [ ] Complex migration → Provide tooling
219
+ - [ ] External dependencies → Coordinate
220
+
221
+ ### Planning Template
222
+ ```markdown
223
+ ## Deprecation Plan
224
+
225
+ ### Architecture Reference
226
+ - Doc: [path to architecture doc]
227
+ - Affected patterns: [patterns from doc]
228
+
229
+ ### Strategy
230
+ - Type: [Soft/Hard Deprecation]
231
+ - Reason: [justify choice]
232
+
233
+ ### Timeline
234
+ | Phase | Date | Action |
235
+ |-------|------|--------|
236
+ | Announce | T-90 (YYYY-MM-DD) | Release notes, changelog, docs |
237
+ | Warn | T-60 (YYYY-MM-DD) | Add runtime warnings |
238
+ | Migrate | T-30 (YYYY-MM-DD) | Help users migrate |
239
+ | Remove | T-0 (YYYY-MM-DD) | Delete deprecated code |
240
+ | Monitor | T+30 (YYYY-MM-DD) | Watch for issues |
241
+
242
+ ### Migration Path
243
+ From: [current usage]
244
+ To: [new approach following architecture doc]
245
+
246
+ #### Step-by-step migration:
247
+ 1. [Step 1]
248
+ 2. [Step 2]
249
+ 3. [Step 3]
250
+
251
+ #### Code examples:
252
+ ```
253
+ // Before (deprecated)
254
+ [old code]
255
+
256
+ // After (recommended)
257
+ [new code following architecture patterns]
258
+ ```
259
+
260
+ ### Communication Plan
261
+ - [ ] Changelog: [version]
262
+ - [ ] Release notes: [version]
263
+ - [ ] Documentation: [update pages]
264
+ - [ ] Email: [stakeholders]
265
+ - [ ] In-app: [warning messages]
266
+ - [ ] Migration guide: [write guide]
267
+
268
+ ### Risks & Mitigation
269
+ | Risk | Likelihood | Impact | Mitigation |
270
+ |------|------------|--------|------------|
271
+ | [Risk 1] | [H/M/L] | [H/M/L] | [Plan] |
272
+ | [Risk 2] | [H/M/L] | [H/M/L] | [Plan] |
273
+
274
+ ### Rollback Plan
275
+ If deprecation causes issues:
276
+ - [ ] How to revert
277
+ - [ ] Fallback option
278
+ - [ ] Communication plan
279
+ ```
280
+
281
+ ### Gate
282
+ - [ ] Plan follows architecture doc
283
+ - [ ] Timeline defined
284
+ - [ ] Migration path clear
285
+ - [ ] Communication planned
286
+ - [ ] Risks identified
287
+ - [ ] Rollback plan exists
288
+
289
+ ---
290
+
291
+ ## Phase 3: MIGRATE
292
+
293
+ **Goal**: Help users migrate to the alternative
294
+
295
+ ### Actions
296
+
297
+ 1. **Announce deprecation** (T-90):
298
+
299
+ Add to CHANGELOG.md:
300
+ ```markdown
301
+ ## [Version] - YYYY-MM-DD
302
+
303
+ ### Deprecated
304
+ - `[deprecated item]` is now deprecated and will be removed in [version/date]
305
+ - Reason: [why]
306
+ - Alternative: Use `[new item]` instead
307
+ - Migration guide: [link to guide]
308
+ ```
309
+
310
+ 2. **Add deprecation markers in code** (T-60):
311
+
312
+ TypeScript/JavaScript:
313
+ ```typescript
314
+ /**
315
+ * @deprecated Use newFunction() instead. Will be removed in v2.0.0
316
+ * @see newFunction
317
+ */
318
+ function oldFunction() {
319
+ console.warn('oldFunction is deprecated. Use newFunction instead.');
320
+ // existing implementation
321
+ }
322
+ ```
323
+
324
+ Go:
325
+ ```go
326
+ // Deprecated: OldFunc is deprecated, use NewFunc instead.
327
+ // It will be removed in v2.0.0.
328
+ func OldFunc() {
329
+ log.Println("WARNING: OldFunc is deprecated, use NewFunc")
330
+ // existing implementation
331
+ }
332
+ ```
333
+
334
+ PHP (Laravel):
335
+ ```php
336
+ /**
337
+ * @deprecated 2.0.0 Use newMethod() instead
338
+ */
339
+ public function oldMethod() {
340
+ trigger_error(
341
+ 'oldMethod is deprecated, use newMethod instead',
342
+ E_USER_DEPRECATED
343
+ );
344
+ // existing implementation
345
+ }
346
+ ```
347
+
348
+ Dart (Flutter):
349
+ ```dart
350
+ @Deprecated('Use newWidget instead. Will be removed in v2.0.0')
351
+ class OldWidget extends StatelessWidget {
352
+ // existing implementation
353
+ }
354
+ ```
355
+
356
+ 3. **Update documentation** (T-60):
357
+ - [ ] Mark deprecated in API docs
358
+ - [ ] Add migration guide
359
+ - [ ] Update examples to use new approach
360
+ - [ ] Add deprecation notice banner
361
+ - [ ] Update README/guides
362
+
363
+ 4. **Create migration tools** (if needed):
364
+ ```bash
365
+ # Example: Automated migration script
366
+ # TypeScript/JavaScript
367
+ npx jscodeshift -t migrate-deprecated-api.js src/
368
+
369
+ # Go
370
+ go fix
371
+
372
+ # Create custom migration scripts
373
+ ```
374
+
375
+ 5. **Proactive migration** (T-30):
376
+
377
+ For internal code:
378
+ ```bash
379
+ # Find all usages
380
+ grep -r "deprecated" --include="*.ts"
381
+
382
+ # Migrate one by one
383
+ # Test after each migration
384
+ # Commit frequently
385
+ ```
386
+
387
+ For external users:
388
+ - [ ] Email notifications with migration guide
389
+ - [ ] Office hours / support sessions
390
+ - [ ] Example migration PRs
391
+ - [ ] FAQ document
392
+
393
+ 6. **Monitor adoption**:
394
+ ```bash
395
+ # Track usage of deprecated code
396
+ # Add metrics/logging if possible
397
+ # Follow up with slow adopters
398
+ ```
399
+
400
+ ### Migration Checklist
401
+ ```markdown
402
+ ## Migration Progress
403
+
404
+ ### Documentation
405
+ - [ ] CHANGELOG.md updated
406
+ - [ ] Release notes written
407
+ - [ ] Migration guide created
408
+ - [ ] API docs updated
409
+ - [ ] Examples updated
410
+
411
+ ### Code Markers
412
+ - [ ] Deprecation decorators added
413
+ - [ ] Runtime warnings added
414
+ - [ ] IDE warnings visible
415
+ - [ ] Tests still passing
416
+
417
+ ### Internal Migration
418
+ - [ ] Internal usages: [X/Y migrated]
419
+ - [ ] Tests updated
420
+ - [ ] Documentation updated
421
+
422
+ ### External Communication
423
+ - [ ] Announcement sent
424
+ - [ ] Migration guide published
425
+ - [ ] Support channels ready
426
+ - [ ] FAQ prepared
427
+
428
+ ### Adoption Tracking
429
+ - [ ] Metrics in place
430
+ - [ ] Adoption rate: [X%]
431
+ - [ ] Blockers identified
432
+ ```
433
+
434
+ ### Gate
435
+ - [ ] Deprecation announced
436
+ - [ ] Warnings in place
437
+ - [ ] Documentation updated
438
+ - [ ] Migration guide available
439
+ - [ ] Internal code migrated (or plan exists)
440
+ - [ ] External users notified
441
+ - [ ] Sufficient time given (per timeline)
442
+
443
+ ---
444
+
445
+ ## Phase 4: REMOVE
446
+
447
+ **Goal**: Safely delete the deprecated code
448
+
449
+ ### Actions
450
+
451
+ 1. **Pre-removal verification** (T-0):
452
+
453
+ Check adoption:
454
+ ```bash
455
+ # Verify deprecation warnings are logged
456
+ # Check metrics for usage
457
+ # Confirm migration targets met
458
+ ```
459
+
460
+ Criteria for removal:
461
+ - [ ] Timeline completed
462
+ - [ ] Migration adoption > 80% (internal)
463
+ - [ ] No critical blockers
464
+ - [ ] Stakeholders notified
465
+ - [ ] Alternative is stable
466
+
467
+ 2. **Create removal branch**:
468
+ ```bash
469
+ git checkout -b remove/deprecated-[feature-name]
470
+ ```
471
+
472
+ 3. **Read architecture doc** for affected layers
473
+
474
+ 4. **Remove deprecated code**:
475
+
476
+ Remove in order (following architecture):
477
+ ```
478
+ 1. Tests for deprecated code
479
+ 2. Deprecated implementation
480
+ 3. Deprecated interfaces/types
481
+ 4. Documentation references
482
+ 5. Migration scripts (if no longer needed)
483
+ ```
484
+
485
+ For each file:
486
+ ```bash
487
+ # Remove the deprecated code
488
+ # Remove deprecation warnings
489
+ # Remove related tests
490
+ # Update imports/dependencies
491
+
492
+ # Run tests after each removal
493
+ [test command from architecture doc]
494
+
495
+ # Commit if successful
496
+ git add .
497
+ git commit -m "remove: [what was removed]"
498
+ ```
499
+
500
+ 5. **Update version**:
501
+
502
+ Breaking change requires major version bump:
503
+ ```
504
+ Semantic Versioning:
505
+ - Major version: Breaking changes (X.0.0)
506
+ - Minor version: New features backward compatible (0.X.0)
507
+ - Patch version: Bug fixes (0.0.X)
508
+ ```
509
+
510
+ 6. **Update documentation**:
511
+ - [ ] Remove from API docs
512
+ - [ ] Archive migration guide (keep for reference)
513
+ - [ ] Update CHANGELOG
514
+ - [ ] Update version compatibility matrix
515
+ - [ ] Update examples
516
+
517
+ ### Removal Checklist
518
+ ```markdown
519
+ ## Removal Progress
520
+
521
+ ### Code Removed
522
+ - [ ] Deprecated implementation: [files]
523
+ - [ ] Deprecated tests: [files]
524
+ - [ ] Deprecated types/interfaces: [files]
525
+ - [ ] Documentation: [pages]
526
+
527
+ ### Architecture Compliance (from doc)
528
+ - [ ] Layer boundaries still respected
529
+ - [ ] Dependencies flow correctly
530
+ - [ ] No broken imports
531
+ - [ ] Clean build
532
+
533
+ ### Testing
534
+ - [ ] All tests pass
535
+ - [ ] No references to deprecated code
536
+ - [ ] Integration tests pass
537
+ - [ ] E2E tests pass
538
+
539
+ ### Documentation
540
+ - [ ] API docs updated
541
+ - [ ] CHANGELOG updated
542
+ - [ ] Migration guide archived
543
+ - [ ] Version bumped: [X.Y.Z]
544
+
545
+ ### Build & Release
546
+ - [ ] Clean build
547
+ - [ ] No warnings
548
+ - [ ] Ready for release
549
+ ```
550
+
551
+ ### Gate
552
+ - [ ] All deprecated code removed
553
+ - [ ] Tests pass
554
+ - [ ] Documentation updated
555
+ - [ ] Version bumped appropriately
556
+ - [ ] No broken dependencies
557
+
558
+ ---
559
+
560
+ ## Phase 5: VERIFY
561
+
562
+ **Goal**: Ensure nothing is broken post-removal
563
+
564
+ ### Actions
565
+
566
+ 1. **Full test suite** (command from architecture doc):
567
+ ```bash
568
+ # Run all tests
569
+ flutter test # Flutter
570
+ flutter test --coverage
571
+
572
+ go test ./... # Go
573
+ go test -cover ./...
574
+
575
+ bun test # React/Remix
576
+ bun test --coverage
577
+
578
+ php artisan test # Laravel
579
+ php artisan test --coverage
580
+ ```
581
+
582
+ 2. **Integration testing**:
583
+ - [ ] Critical user flows work
584
+ - [ ] No regressions
585
+ - [ ] Performance unchanged
586
+ - [ ] Error handling works
587
+
588
+ 3. **Build verification**:
589
+ ```bash
590
+ # Clean build test
591
+ rm -rf node_modules && npm install && npm run build # Node
592
+ go clean && go build ./... # Go
593
+ flutter clean && flutter build # Flutter
594
+ composer install && php artisan optimize # Laravel
595
+ ```
596
+
597
+ 4. **Dependency check**:
598
+ ```bash
599
+ # Check for broken imports
600
+ # Verify all dependencies resolve
601
+ # No circular dependencies introduced
602
+ ```
603
+
604
+ 5. **Monitor after release** (T+30):
605
+ - [ ] Error rates normal
606
+ - [ ] Performance metrics stable
607
+ - [ ] No spike in support requests
608
+ - [ ] User feedback positive/neutral
609
+
610
+ 6. **Handle issues**:
611
+
612
+ If problems arise:
613
+ ```markdown
614
+ Severity assessment:
615
+ 🔴 Critical - Rollback immediately
616
+ 🟠 High - Hotfix within 24h
617
+ 🟡 Medium - Fix in next patch
618
+ 🟢 Low - Document workaround
619
+ ```
620
+
621
+ ### Verification Report
622
+ ```markdown
623
+ ## Post-Removal Verification
624
+
625
+ ### Architecture Compliance: [Pass/Fail]
626
+ - Reference: [architecture doc path]
627
+ - Structure: [Pass/Fail]
628
+ - Dependencies: [Pass/Fail]
629
+ - Patterns: [Pass/Fail]
630
+
631
+ ### Testing: [Pass/Fail]
632
+ | Test Type | Status | Coverage |
633
+ |-----------|--------|----------|
634
+ | Unit | [Pass/Fail] | [X%] |
635
+ | Integration | [Pass/Fail] | [X%] |
636
+ | E2E | [Pass/Fail] | [X%] |
637
+
638
+ ### Build: [Pass/Fail]
639
+ - Clean build: [Pass/Fail]
640
+ - No warnings: [Pass/Fail]
641
+ - Dependencies: [Pass/Fail]
642
+
643
+ ### Monitoring (T+30): [Pass/Fail]
644
+ | Metric | Before | After | Status |
645
+ |--------|--------|-------|--------|
646
+ | Error rate | X% | Y% | [✓/✗] |
647
+ | Performance | X ms | Y ms | [✓/✗] |
648
+ | Support tickets | X | Y | [✓/✗] |
649
+
650
+ ### Issues Found
651
+ - [Issue 1]: [Severity] - [Status]
652
+ - [Issue 2]: [Severity] - [Status]
653
+
654
+ ### Recommendation: [Success/Rollback/Hotfix Needed]
655
+ ```
656
+
657
+ ### Gate
658
+ - [ ] All tests pass
659
+ - [ ] Build successful
660
+ - [ ] No critical issues
661
+ - [ ] Metrics stable
662
+ - [ ] Stakeholders satisfied
663
+
664
+ ---
665
+
666
+ ## Quick Reference
667
+
668
+ ### Architecture Docs
669
+ | Stack | Doc |
670
+ |-------|-----|
671
+ | All | `clean-architecture.md` |
672
+ | Flutter | `flutter-mobile.md` |
673
+ | React | `react-frontend.md` |
674
+ | Go | `go-backend.md` |
675
+ | Laravel | `laravel-backend.md` |
676
+ | Remix | `remix-fullstack.md` |
677
+ | Monorepo | `monorepo.md` |
678
+
679
+ ### Deprecation Timeline Templates
680
+
681
+ #### Internal API
682
+ ```
683
+ Week 0: Announce + document
684
+ Week 2: Add warnings
685
+ Week 4: Migrate internal code
686
+ Week 6: Remove
687
+ Week 10: Monitor
688
+ ```
689
+
690
+ #### Public API
691
+ ```
692
+ Month 0: Announce in minor release
693
+ Month 1: Add warnings + migration guide
694
+ Month 3: Help users migrate
695
+ Month 6: Remove in major release
696
+ Month 7: Monitor
697
+ ```
698
+
699
+ #### Critical Security Issue
700
+ ```
701
+ Day 0: Announce + provide alternative
702
+ Day 1: Add strong warnings
703
+ Day 3: Remove in patch release
704
+ Day 7: Monitor closely
705
+ ```
706
+
707
+ ### Deprecation Notice Templates
708
+
709
+ #### Code Comment
710
+ ```typescript
711
+ /**
712
+ * @deprecated since v1.5.0, will be removed in v2.0.0
713
+ * Use newFunction() instead.
714
+ *
715
+ * Migration:
716
+ * ```
717
+ * // Before
718
+ * oldFunction(x, y)
719
+ *
720
+ * // After
721
+ * newFunction({ x, y })
722
+ * ```
723
+ *
724
+ * @see newFunction
725
+ */
726
+ ```
727
+
728
+ #### CHANGELOG Entry
729
+ ```markdown
730
+ ### Deprecated
731
+ - `oldFunction()` - Use `newFunction()` instead. Will be removed in v2.0.0.
732
+ - Reason: Inconsistent API design
733
+ - Migration guide: https://docs.example.com/migrate-to-v2
734
+ ```
735
+
736
+ #### Release Notes
737
+ ```markdown
738
+ ## Deprecations
739
+
740
+ ### `oldFeature` is now deprecated
741
+
742
+ **What**: The `oldFeature` API is deprecated.
743
+
744
+ **Why**: It doesn't align with our architecture patterns and causes confusion.
745
+
746
+ **When**: Will be removed in v2.0.0 (estimated: YYYY-MM-DD)
747
+
748
+ **Migration**: Use `newFeature` instead:
749
+
750
+ ```javascript
751
+ // Before
752
+ import { oldFeature } from 'package';
753
+ oldFeature.doSomething();
754
+
755
+ // After
756
+ import { newFeature } from 'package';
757
+ newFeature.doSomething();
758
+ ```
759
+
760
+ **Need help?** See the [migration guide](link) or contact support.
761
+ ```
762
+
763
+ #### Email Template
764
+ ```
765
+ Subject: Deprecation Notice: [Feature Name] in [Product Name]
766
+
767
+ Hi [User],
768
+
769
+ We're writing to inform you about an upcoming change to [Product Name].
770
+
771
+ What's changing:
772
+ [Feature/API name] is being deprecated and will be removed in [version/date].
773
+
774
+ Why:
775
+ [Brief explanation]
776
+
777
+ What you need to do:
778
+ 1. Review your usage of [deprecated feature]
779
+ 2. Follow our migration guide: [link]
780
+ 3. Update your code before [date]
781
+
782
+ Need help?
783
+ - Migration guide: [link]
784
+ - Support: [email]
785
+ - Office hours: [schedule]
786
+
787
+ Timeline:
788
+ - Today: Deprecation announced
789
+ - [Date]: Warnings added
790
+ - [Date]: Feature removed
791
+
792
+ Thank you,
793
+ [Team Name]
794
+ ```
795
+
796
+ ### Phase Summary
797
+
798
+ | Phase | Duration | Key Actions |
799
+ |-------|----------|-------------|
800
+ | IDENTIFY | 1-2 days | Analyze impact, read arch doc |
801
+ | PLAN | 3-5 days | Timeline, migration guide, communication |
802
+ | MIGRATE | 30-90 days | Warnings, help users migrate |
803
+ | REMOVE | 1-2 days | Delete code, update docs |
804
+ | VERIFY | 7-30 days | Test, monitor, support |
805
+
806
+ ### Deprecation Strategies
807
+
808
+ #### Soft Deprecation
809
+ **Use when:**
810
+ - Non-critical feature
811
+ - Time for gradual migration
812
+ - Backward compatibility important
813
+ - External users affected
814
+
815
+ **Approach:**
816
+ - Add warnings but keep functional
817
+ - Provide migration period
818
+ - Remove in future major version
819
+
820
+ #### Hard Deprecation
821
+ **Use when:**
822
+ - Security vulnerability
823
+ - Critical bug
824
+ - Technical debt removal
825
+ - Internal-only code
826
+
827
+ **Approach:**
828
+ - Breaking change in next major version
829
+ - Shorter timeline
830
+ - Force migration
831
+
832
+ ### Communication Timeline
833
+
834
+ ```
835
+ T-90: Announce
836
+ ├── Changelog
837
+ ├── Release notes
838
+ ├── Documentation
839
+ └── Email (if external)
840
+
841
+ T-60: Warn
842
+ ├── Add runtime warnings
843
+ ├── IDE warnings
844
+ ├── Migration guide live
845
+ └── Reminder emails
846
+
847
+ T-30: Support
848
+ ├── Help users migrate
849
+ ├── Office hours
850
+ ├── Example PRs
851
+ └── FAQ updates
852
+
853
+ T-0: Remove
854
+ ├── Delete code
855
+ ├── Major version bump
856
+ ├── Final announcement
857
+ └── Monitor
858
+
859
+ T+30: Monitor
860
+ ├── Check metrics
861
+ ├── Handle issues
862
+ ├── Collect feedback
863
+ └── Document learnings
864
+ ```
865
+
866
+ ### Success Criteria
867
+
868
+ Deprecation is successful when:
869
+ 1. All stakeholders notified in advance
870
+ 2. Migration path is clear and documented
871
+ 3. Sufficient time given for migration
872
+ 4. Deprecated code cleanly removed
873
+ 5. No regressions introduced
874
+ 6. Metrics remain stable post-removal
875
+ 7. Minimal support burden
876
+ 8. Architecture doc patterns followed
877
+
878
+ ---
879
+
880
+ ## Anti-Patterns to Avoid
881
+
882
+ ### Silent Deprecation
883
+ ```
884
+ DON'T: Remove without announcement
885
+ DON'T: No warnings or migration guide
886
+ DO: Clear communication at every step
887
+ ```
888
+
889
+ ### Rushed Timeline
890
+ ```
891
+ DON'T: Remove before users can migrate
892
+ DON'T: Skip migration period
893
+ DO: Give adequate time based on impact
894
+ ```
895
+
896
+ ### No Alternative
897
+ ```
898
+ DON'T: Deprecate without replacement
899
+ DON'T: Force users into worse solution
900
+ DO: Provide better alternative first
901
+ ```
902
+
903
+ ### Poor Communication
904
+ ```
905
+ DON'T: Assume users read release notes
906
+ DON'T: One-time announcement only
907
+ DO: Multi-channel, repeated communication
908
+ ```
909
+
910
+ ### Breaking Without Warning
911
+ ```
912
+ DON'T: Remove in minor/patch version
913
+ DON'T: Surprise breaking changes
914
+ DO: Follow semantic versioning
915
+ DO: Breaking changes only in major versions
916
+ ```
917
+
918
+ ### Ignoring Feedback
919
+ ```
920
+ DON'T: Ignore migration blockers
921
+ DON'T: Proceed despite user concerns
922
+ DO: Listen and adjust timeline if needed
923
+ ```