ace-docs 0.31.0

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.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/.ace-defaults/docs/config.yml +169 -0
  3. data/.ace-defaults/docs/multi-subject-example.md +130 -0
  4. data/.ace-defaults/docs/single-subject-example.md +150 -0
  5. data/.ace-defaults/nav/protocols/guide-sources/ace-docs.yml +10 -0
  6. data/.ace-defaults/nav/protocols/prompt-sources/ace-docs.yml +34 -0
  7. data/.ace-defaults/nav/protocols/tmpl-sources/ace-docs.yml +10 -0
  8. data/.ace-defaults/nav/protocols/wfi-sources/ace-docs.yml +19 -0
  9. data/CHANGELOG.md +1082 -0
  10. data/LICENSE +21 -0
  11. data/README.md +40 -0
  12. data/Rakefile +14 -0
  13. data/exe/ace-docs +14 -0
  14. data/handbook/guides/documentation/ruby.md +16 -0
  15. data/handbook/guides/documentation/rust.md +35 -0
  16. data/handbook/guides/documentation/typescript.md +18 -0
  17. data/handbook/guides/documentation.g.md +437 -0
  18. data/handbook/guides/documents-embedded-sync.g.md +473 -0
  19. data/handbook/guides/documents-embedding.g.md +276 -0
  20. data/handbook/guides/markdown-style.g.md +290 -0
  21. data/handbook/prompts/ace-change-analyzer.system.md +113 -0
  22. data/handbook/prompts/ace-change-analyzer.user.md +95 -0
  23. data/handbook/prompts/document-analysis.md +74 -0
  24. data/handbook/prompts/document-analysis.system.md +129 -0
  25. data/handbook/prompts/markdown-style.system.md +113 -0
  26. data/handbook/skills/as-docs-create-adr/SKILL.md +35 -0
  27. data/handbook/skills/as-docs-create-api/SKILL.md +35 -0
  28. data/handbook/skills/as-docs-create-user/SKILL.md +35 -0
  29. data/handbook/skills/as-docs-maintain-adrs/SKILL.md +35 -0
  30. data/handbook/skills/as-docs-squash-changelog/SKILL.md +42 -0
  31. data/handbook/skills/as-docs-update/SKILL.md +36 -0
  32. data/handbook/skills/as-docs-update-blueprint/SKILL.md +28 -0
  33. data/handbook/skills/as-docs-update-roadmap/SKILL.md +24 -0
  34. data/handbook/skills/as-docs-update-tools/SKILL.md +36 -0
  35. data/handbook/skills/as-docs-update-usage/SKILL.md +26 -0
  36. data/handbook/templates/code-docs/javascript-jsdoc.template.md +102 -0
  37. data/handbook/templates/code-docs/ruby-yard.template.md +85 -0
  38. data/handbook/templates/project-docs/README.template.md +73 -0
  39. data/handbook/templates/project-docs/architecture.template.md +300 -0
  40. data/handbook/templates/project-docs/blueprint.template.md +165 -0
  41. data/handbook/templates/project-docs/context/ownership.yml +160 -0
  42. data/handbook/templates/project-docs/decisions/adr.template.md +60 -0
  43. data/handbook/templates/project-docs/prd.template.md +144 -0
  44. data/handbook/templates/project-docs/roadmap/roadmap.template.md +47 -0
  45. data/handbook/templates/project-docs/vision.template.md +233 -0
  46. data/handbook/templates/user-docs/user-guide.template.md +107 -0
  47. data/handbook/workflow-instructions/docs/create-adr.wf.md +334 -0
  48. data/handbook/workflow-instructions/docs/create-api.wf.md +448 -0
  49. data/handbook/workflow-instructions/docs/create-cookbook.wf.md +434 -0
  50. data/handbook/workflow-instructions/docs/create-user.wf.md +399 -0
  51. data/handbook/workflow-instructions/docs/maintain-adrs.wf.md +589 -0
  52. data/handbook/workflow-instructions/docs/squash-changelog.wf.md +246 -0
  53. data/handbook/workflow-instructions/docs/update-blueprint.wf.md +361 -0
  54. data/handbook/workflow-instructions/docs/update-context.wf.md +336 -0
  55. data/handbook/workflow-instructions/docs/update-roadmap.wf.md +421 -0
  56. data/handbook/workflow-instructions/docs/update-tools.wf.md +307 -0
  57. data/handbook/workflow-instructions/docs/update-usage.wf.md +710 -0
  58. data/handbook/workflow-instructions/docs/update.wf.md +418 -0
  59. data/lib/ace/docs/atoms/diff_filterer.rb +131 -0
  60. data/lib/ace/docs/atoms/frontmatter_free_matcher.rb +20 -0
  61. data/lib/ace/docs/atoms/git_date_resolver.rb +16 -0
  62. data/lib/ace/docs/atoms/readme_metadata_inferrer.rb +60 -0
  63. data/lib/ace/docs/atoms/terminology_extractor.rb +308 -0
  64. data/lib/ace/docs/atoms/time_range_calculator.rb +96 -0
  65. data/lib/ace/docs/atoms/timestamp_parser.rb +106 -0
  66. data/lib/ace/docs/atoms/type_inferrer.rb +70 -0
  67. data/lib/ace/docs/cli/commands/analyze.rb +351 -0
  68. data/lib/ace/docs/cli/commands/analyze_consistency.rb +185 -0
  69. data/lib/ace/docs/cli/commands/discover.rb +75 -0
  70. data/lib/ace/docs/cli/commands/scope_options.rb +71 -0
  71. data/lib/ace/docs/cli/commands/status.rb +241 -0
  72. data/lib/ace/docs/cli/commands/update.rb +198 -0
  73. data/lib/ace/docs/cli/commands/validate.rb +225 -0
  74. data/lib/ace/docs/cli.rb +60 -0
  75. data/lib/ace/docs/models/analysis_report.rb +120 -0
  76. data/lib/ace/docs/models/consistency_report.rb +259 -0
  77. data/lib/ace/docs/models/document.rb +354 -0
  78. data/lib/ace/docs/molecules/change_detector.rb +389 -0
  79. data/lib/ace/docs/molecules/document_loader.rb +133 -0
  80. data/lib/ace/docs/molecules/frontmatter_manager.rb +85 -0
  81. data/lib/ace/docs/molecules/git_date_resolver.rb +30 -0
  82. data/lib/ace/docs/organisms/cross_document_analyzer.rb +274 -0
  83. data/lib/ace/docs/organisms/document_registry.rb +318 -0
  84. data/lib/ace/docs/organisms/validator.rb +164 -0
  85. data/lib/ace/docs/prompts/compact_diff_prompt.rb +119 -0
  86. data/lib/ace/docs/prompts/consistency_prompt.rb +286 -0
  87. data/lib/ace/docs/prompts/document_analysis_prompt.rb +389 -0
  88. data/lib/ace/docs/version.rb +7 -0
  89. data/lib/ace/docs.rb +82 -0
  90. data/lib/test.rb +4 -0
  91. metadata +347 -0
@@ -0,0 +1,589 @@
1
+ ---
2
+ doc-type: workflow
3
+ title: Maintain Architecture Decision Records
4
+ purpose: Maintain ADR lifecycle including evolution, archival, and synchronization
5
+ ace-docs:
6
+ last-updated: 2026-02-23
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # Maintain Architecture Decision Records
11
+
12
+ ## Goal
13
+
14
+ Keep ADRs accurate, relevant, and synchronized with current codebase state through evolution documentation, archival of
15
+ obsolete patterns, and maintaining the decisions.md summary.
16
+
17
+ ## Prerequisites
18
+
19
+ * Existing ADRs in `docs/decisions/`
20
+ * Understanding of current codebase architecture
21
+ * Access to search codebase for pattern usage
22
+ * Ability to modify and commit documentation
23
+
24
+ ## Project Context Loading
25
+
26
+ * Read and follow: `ace-bundle wfi://bundle`
27
+
28
+ ## Maintenance Actions
29
+
30
+ ### 1. Review ADRs
31
+
32
+ Periodic review to identify stale, obsolete, or evolved patterns
33
+
34
+ ### 2. Archive Obsolete ADRs
35
+
36
+ When patterns are no longer used in current codebase
37
+
38
+ ### 3. Document Evolution
39
+
40
+ When patterns changed but principles remain valid
41
+
42
+ ### 4. Update Scope
43
+
44
+ When implementation details obsolete but concepts still apply
45
+
46
+ ### 5. Sync with decisions.md
47
+
48
+ Keep summary document synchronized with all ADRs
49
+
50
+ ### 6. Check for Missing ADRs
51
+
52
+ Identify gaps between files and summary
53
+
54
+ ## Decision Criteria
55
+
56
+ ### When to Archive Completely
57
+
58
+ **Indicators:**
59
+
60
+ * Pattern not used anywhere in current codebase
61
+ * Technology/framework no longer in use
62
+ * Decision superseded by fundamentally different approach
63
+ * Only found in `_legacy/` directories
64
+
65
+ **Process:**
66
+
67
+ 1. Research actual usage (grep searches)
68
+ 2. Verify only in legacy code
69
+ 3. Add deprecation notice to ADR
70
+ 4. Move to `docs/decisions/archive/`
71
+ 5. Update `docs/decisions.md`
72
+
73
+ **Examples from Production:**
74
+
75
+ * **ADR-006**: CI-Aware VCR Configuration (VCR only in `_legacy/dev-tools/spec/support/vcr.rb`)
76
+ * **ADR-007**: Zeitwerk Autoloading (only in `_legacy/dev-tools/lib/coding_agent_tools.rb`)
77
+ * **ADR-008**: Observability with dry-monitor (only in `_legacy/dev-tools/`)
78
+ * **ADR-009**: Centralized CLI Error Reporting (ErrorReporter only in `_legacy/dev-tools/`)
79
+
80
+ ### When to Add Evolution Section
81
+
82
+ **Indicators:**
83
+
84
+ * Core principles still valid
85
+ * Implementation changed significantly
86
+ * Pattern migrated to new architecture
87
+ * Original decision provides valuable context
88
+
89
+ **Process:**
90
+
91
+ 1. Keep original ADR content intact
92
+ 2. Update status line to indicate evolution
93
+ 3. Add evolution section at end
94
+ 4. Document current state vs original
95
+ 5. Provide examples from current codebase
96
+
97
+ **Examples from Production:**
98
+
99
+ * **ADR-003**: Template Directory Separation (evolved from the legacy dev-handbook structure to `gem/handbook/`)
100
+ * **ADR-004**: Consistent Path Standards (evolved to distributed gem/handbook/ pattern)
101
+
102
+ ### When to Update Scope
103
+
104
+ **Indicators:**
105
+
106
+ * General principles still apply
107
+ * Specific implementation details outdated
108
+ * Technology-specific parts obsolete
109
+ * Core concepts remain best practice
110
+
111
+ **Process:**
112
+
113
+ 1. Add scope note at document top
114
+ 2. Clarify what's still valid vs legacy
115
+ 3. Keep original content for context
116
+ 4. Reference current implementations
117
+
118
+ **Examples from Production:**
119
+
120
+ * **ADR-013**: Class Naming Conventions (naming principles valid, Zeitwerk-specific inflections legacy)
121
+
122
+ ## Research Process
123
+
124
+ ### Verify Pattern Usage in Codebase
125
+
126
+ Before archiving or evolving, verify actual usage:
127
+
128
+ # Search for pattern in current gems
129
+ grep -r "PATTERN_NAME" ace-*/lib/ ace-*/test/
130
+
131
+ # Check if only in legacy code
132
+ grep -r "PATTERN_NAME" _legacy/dev-tools/
133
+
134
+ # Count occurrences by location
135
+ grep -c "PATTERN_NAME" ace-*/lib/**/*.rb
136
+ grep -c "PATTERN_NAME" _legacy/**/*.rb
137
+ {: .language-bash}
138
+
139
+ **Example Searches from October 2025 Review:**
140
+
141
+ # VCR usage
142
+ grep -r "VCR" ace-*/test/ --type ruby
143
+ # Result: No files found (only in _legacy)
144
+
145
+ # Zeitwerk usage
146
+ grep -r "Zeitwerk" ace-*/lib/ --type ruby
147
+ # Result: Only in _legacy (current gems use explicit requires)
148
+
149
+ # Faraday usage
150
+ grep -r "Faraday" ace-*/lib/ --type ruby
151
+ # Result: Found in ace-llm/lib/ace/llm/atoms/http_client.rb (still active!)
152
+ {: .language-bash}
153
+
154
+ ### Inspect Current Gem Structure
155
+
156
+ # List production gems
157
+ ls -d ace-* | grep -v legacy | grep -v _
158
+
159
+ # Check specific gem implementation
160
+ ls ace-llm/lib/ace/llm/
161
+ ls ace-core/lib/ace/core/
162
+
163
+ # Verify pattern in current code
164
+ cat ace-gem/lib/ace/gem/specific_file.rb
165
+ {: .language-bash}
166
+
167
+ ## Archival Process
168
+
169
+ ### 1. Create Archive Structure (First Time Only)
170
+
171
+ # Create archive directory
172
+ mkdir -p docs/decisions/archive
173
+ {: .language-bash}
174
+
175
+ ### 2. Create/Update Archive README
176
+
177
+ Create `docs/decisions/archive/README.md`:
178
+
179
+ Use the embedded template below. Update with each new archival.
180
+
181
+ ### 3. Add Deprecation Notice to ADR
182
+
183
+ At the top of the ADR file, after the status line, use the deprecation notice template embedded below (see
184
+ `tmpl://decisions/deprecation-notice`).
185
+
186
+ **Original ADR (for historical reference):**
187
+
188
+
189
+ Then keep all original content below for historical reference.
190
+
191
+ ### 4. Move File to Archive
192
+
193
+ ```bash
194
+ mv docs/decisions/ADR-XXX-title.md docs/decisions/archive/
195
+
196
+ ### 5. Update docs/decisions.md
197
+
198
+ **Remove from main sections:**
199
+
200
+ * Delete the entry from whichever section it was in
201
+
202
+ **Add to "Archived Decisions" section:**
203
+
204
+ ## Archived Decisions
205
+
206
+ The following decisions are **archived** as they apply only to legacy code:
207
+ - **ADR-XXX**: [Title] ([reason for archival])
208
+ {: .language-markdown}
209
+
210
+ ## Evolution Process
211
+
212
+ ### 1. Keep Original Content Intact
213
+
214
+ **DO NOT** modify the original ADR content. Historical context is valuable.
215
+
216
+ ### 2. Update Status Line
217
+
218
+ Replace the status section:
219
+
220
+ ## Status
221
+
222
+ Accepted - Evolved to [New Pattern Name] (see ADR-XXX)
223
+ Date: YYYY-MM-DD (original)
224
+ Evolution: YYYY-MM-DD
225
+ {: .language-markdown}
226
+
227
+ ### 3. Add Evolution Section at End
228
+
229
+ After all original content, add:
230
+
231
+ ## Evolution: [New Pattern Name] (Month Year)
232
+
233
+ ### Current State
234
+
235
+ The original [pattern name] has evolved with [context - e.g., mono-repo migration].
236
+ {: .language-markdown}
237
+
238
+ \[Current implementation structure/pattern\]
239
+
240
+
241
+ ### Key Changes
242
+
243
+ 1. **Distribution**: [How pattern is distributed now]
244
+ 2. **Implementation**: [New implementation approach]
245
+ 3. **Integration**: [How it integrates with current system]
246
+ 4. **Discovery**: [How developers find/use it now]
247
+
248
+ ### Examples in Production Gems
249
+
250
+ - **gem-name**: `path/to/example.rb` or `path/to/file.md`
251
+ - **gem-name**: `path/to/another-example`
252
+
253
+ ### Relationship to Original Decision
254
+
255
+ The **principles remain valid**:
256
+ - ✅ [Core principle 1 still applies]
257
+ - ✅ [Core principle 2 still applies]
258
+ - ✅ [Core principle 3 still applies]
259
+
260
+ The **implementation evolved**:
261
+ - From: [Old pattern/location]
262
+ - To: [New pattern/location]
263
+ - Reason: [Why it changed - modularity, simplicity, etc.]
264
+
265
+ See **ADR-XXX: [New Pattern ADR]** for complete details of current pattern.
266
+
267
+ ### 4. Update docs/decisions.md
268
+
269
+ Add evolution note to the entry:
270
+
271
+ ### Decision Title
272
+ **Decision**: [Summary including evolution note]
273
+ **Impact**: [Updated impact statement]
274
+ **Details**: [ADR-XXX](decisions/ADR-XXX-title.md) (evolved to gem pattern, see ADR-YYY)
275
+ {: .language-markdown}
276
+
277
+ ## Scope Update Process
278
+
279
+ ### 1. Add Scope Note at Top
280
+
281
+ After the status section, before original context:
282
+
283
+ ## Scope Note (Month Year)
284
+
285
+ **Current Relevance**: The **[core concept]** in this ADR still applies to current ace-* gems. The **[specific part]** is legacy-only (see ADR-XXX archive).
286
+
287
+ **Current gems** (ace-llm, ace-core, etc.) use [new approach] instead of [old approach], but the [principle/pattern] remains best practice.
288
+
289
+ ---
290
+
291
+ **Original Context:**
292
+ {: .language-markdown}
293
+
294
+ Then keep all original content below.
295
+
296
+ ### 2. Update docs/decisions.md Entry
297
+
298
+ Add clarification note:
299
+
300
+ ### Decision Title
301
+ **Decision**: [Summary]. Note: [Specific parts] are legacy; [principles] still apply.
302
+ **Impact**: [Updated with scope clarification]
303
+ **Details**: [ADR-XXX](decisions/ADR-XXX-title.md)
304
+ {: .language-markdown}
305
+
306
+ ## Synchronization with decisions.md
307
+
308
+ ### Check Current State
309
+
310
+ # List all active ADRs
311
+ ls docs/decisions/ADR-*.md | grep -v archive | sort
312
+
313
+ # List archived ADRs
314
+ ls docs/decisions/archive/ADR-*.md 2>/dev/null | sort
315
+
316
+ # Count ADRs
317
+ echo "Active: $(ls docs/decisions/ADR-*.md | grep -v archive | wc -l)"
318
+ echo "Archived: $(ls docs/decisions/archive/ADR-*.md 2>/dev/null | wc -l)"
319
+ {: .language-bash}
320
+
321
+ ### Check for Missing ADRs in decisions.md
322
+
323
+ Find ADRs that exist as files but aren't in decisions.md:
324
+
325
+ # Extract ADR numbers from files
326
+ ls docs/decisions/ADR-*.md | grep -v archive | grep -o 'ADR-[0-9]*' | sort > /tmp/adr-files.txt
327
+
328
+ # Extract ADR references from decisions.md (active sections only)
329
+ grep -o 'ADR-[0-9]*' docs/decisions.md | grep -v "Archived Decisions" | sort -u > /tmp/adr-refs.txt
330
+
331
+ # Find missing (in files but not in decisions.md)
332
+ comm -23 /tmp/adr-files.txt /tmp/adr-refs.txt
333
+ {: .language-bash}
334
+
335
+ ### Check for Orphaned References
336
+
337
+ Find ADRs referenced in decisions.md but don't exist as files:
338
+
339
+ # Find references without files
340
+ comm -13 /tmp/adr-files.txt /tmp/adr-refs.txt
341
+ {: .language-bash}
342
+
343
+ ### Update decisions.md Structure
344
+
345
+ Ensure proper sectioning:
346
+
347
+ 1. **Active Decisions** - Currently applicable patterns
348
+ 2. **Architecture Decisions** - System design choices
349
+ 3. **Gem Architecture Patterns** - Gem-specific patterns
350
+ 4. **Development Tool Decisions** - Tool and process patterns
351
+ 5. **Archived Decisions** - Obsolete patterns (list only, with reasons)
352
+
353
+ ## Validation
354
+
355
+ ### After Maintenance Actions
356
+
357
+ # Validate modified ADRs
358
+ ace-docs validate docs/decisions/ADR-*.md
359
+
360
+ # Validate decisions.md
361
+ ace-docs validate docs/decisions.md
362
+
363
+ # Check links (if ace-lint available)
364
+ ace-lint docs/decisions/*.md
365
+ {: .language-bash}
366
+
367
+ ### Manual Checks
368
+
369
+ * All ADR files have proper frontmatter
370
+ * All archived ADRs have deprecation
371
+ notices
372
+ * All evolved ADRs have evolution sections
373
+ * decisions.md entries match file names
374
+ * No broken ADR cross-references
375
+ * Archive README lists all archived ADRs
376
+
377
+
378
+ ## Common Maintenance Scenarios
379
+
380
+ ### Scenario 1: Legacy Pattern Discovered
381
+
382
+ **Situation**: Found code pattern that might be obsolete
383
+
384
+ **Process**:
385
+
386
+ 1. Research usage with grep searches
387
+ 2. Check current gems vs \_legacy/
388
+ 3. If only in legacy → archive
389
+ 4. If in current gems → verify if evolution needed
390
+ 5. Update decisions.md accordingly
391
+
392
+ **Example**: October 2025 review found VCR, Zeitwerk, dry-monitor, ErrorReporter only in `_legacy/dev-tools/`
393
+
394
+ ### Scenario 2: Pattern Evolved to New Architecture
395
+
396
+ **Situation**: Pattern migrated (e.g., mono-repo migration)
397
+
398
+ **Process**:
399
+
400
+ 1. Verify new implementation in current gems
401
+ 2. Document both old and new patterns
402
+ 3. Add evolution section to original ADR
403
+ 4. Consider creating new ADR if fundamentally different
404
+ 5. Update decisions.md with evolution note
405
+
406
+ **Example**: Template patterns evolved from the legacy dev-handbook structure to `gem/handbook/`
407
+
408
+ ### Scenario 3: Quarterly ADR Review
409
+
410
+ **Checklist**:
411
+
412
+ * Check all ADRs for staleness
413
+ * Verify examples still accurate
414
+ * Update technology versions if referenced
415
+ * Sync with current gem structure
416
+ * Run missing ADR checks
417
+ * Update decisions.md if needed
418
+
419
+
420
+ ### Scenario 4: New ADR Supersedes Old
421
+
422
+ **Process**:
423
+
424
+ 1. Create new ADR (see `create-adr.wf.md`)
425
+ 2. Add "Supersedes: ADR-XXX" to new ADR
426
+ 3. Archive or evolve old ADR appropriately
427
+ 4. Update decisions.md to reflect relationship
428
+
429
+ ## Integration with create-adr Workflow
430
+
431
+ When creating new ADRs:
432
+
433
+ **Check for supersession:**
434
+
435
+ # Search for related existing ADRs
436
+ grep -i "pattern-name" docs/decisions/ADR-*.md
437
+ {: .language-bash}
438
+
439
+ **If superseding:**
440
+
441
+ 1. Note in new ADR: "Supersedes: ADR-XXX"
442
+ 2. Archive old ADR with deprecation notice
443
+ 3. Cross-reference in decisions.md
444
+
445
+ **Lifecycle:**
446
+
447
+ * **Creation**: Use `create-adr.wf.md`
448
+ * **Maintenance**: Use this workflow
449
+ * **Both**: Update decisions.md for consistency
450
+
451
+ ## Success Criteria
452
+
453
+ * All ADRs reflect current codebase state
454
+ * Obsolete patterns clearly marked as
455
+ archived
456
+ * Evolution documented with clear examples
457
+ * decisions.md synchronized with all ADR
458
+ files
459
+ * No orphaned or undocumented decisions
460
+ * Archive README up to date
461
+ * All cross-references valid
462
+
463
+
464
+ ## Troubleshooting
465
+
466
+ **Cannot determine if pattern is obsolete:**
467
+
468
+ * Research with grep across entire codebase
469
+ * Check both current gems and \_legacy/
470
+ * Look for alternative implementations
471
+ * Consult recent commits for migration patterns
472
+
473
+ **Unsure whether to archive or evolve:**
474
+
475
+ * Archive if: Pattern completely replaced, no longer applicable
476
+ * Evolve if: Same problem solved differently, principles still valid
477
+ * Update scope if: General concept valid, specific tech obsolete
478
+
479
+ **decisions.md sync errors:**
480
+
481
+ * Use comm commands to find mismatches
482
+ * Manually review each section
483
+ * Ensure archived ADRs only in "Archived Decisions" section
484
+
485
+ <documents>
486
+ <template path="tmpl://decisions/archive-readme"># Archived Architecture Decision Records
487
+
488
+ This directory contains Architecture Decision Records (ADRs) that are **deprecated** and no longer applicable to the current codebase.
489
+
490
+ ## Why Archive Instead of Delete?
491
+
492
+ Archived ADRs preserve historical context and help understand the evolution of the codebase. They document decisions that were valid during specific phases but have been superseded by the current architecture.
493
+
494
+ ## Archived ADRs
495
+
496
+ ### ADR-XXX: Title
497
+ - **Archived**: YYYY-MM-DD
498
+ - **Reason**: Brief explanation of why archived
499
+ - **Current State**: Pointer to current practice or ADR
500
+ - **Context**: When this originally applied
501
+
502
+ ## Migration Context
503
+
504
+ These ADRs were created during [specific phase, e.g., "legacy dev-tools phase"] before [migration event, e.g., "mono-repo migration (ADR-015)"]. The migration introduced new patterns:
505
+
506
+ - [List key architectural changes]
507
+ - [Reference to migration ADRs]
508
+ - [Current patterns that replaced archived ones]
509
+
510
+ ## Related Active ADRs
511
+
512
+ For current architecture decisions, see:
513
+ - **docs/decisions.md**: Summary of all active decisions
514
+ - **ADR-XXX**: [Relevant current ADR]
515
+
516
+ ---
517
+
518
+ **Note**: These archived ADRs are kept for historical reference only. Do not implement patterns from archived ADRs in new code.
519
+ </template>
520
+
521
+ <template path="tmpl://decisions/deprecation-notice">## Status
522
+
523
+ **Deprecated - Archived (Month Year)**
524
+
525
+ Original Status: Accepted
526
+ Date: YYYY-MM-DD
527
+
528
+ ## Deprecation Notice
529
+
530
+ **This ADR is archived and no longer applicable to the current codebase.**
531
+
532
+ - **Archived**: YYYY-MM-DD
533
+ - **Reason**: [Specific reason - pattern not used, technology obsolete, superseded, etc.]
534
+ - **Current Practice**: [Pointer to current approach, ADR, or documentation]
535
+ - **Context**: [When/why this originally applied - e.g., "applied to legacy dev-tools before mono-repo migration"]
536
+
537
+ For current patterns, see:
538
+ - **ADR-XXX**: [Title and relevance]
539
+ - **Documentation**: [Path to current docs if applicable]
540
+
541
+ ---
542
+
543
+ **Original ADR (for historical reference):**
544
+ </template>
545
+
546
+ <template path="tmpl://decisions/evolution-section">## Evolution: [New Pattern Name] (Month Year)
547
+
548
+ ### Current State
549
+
550
+ The original [pattern/decision] has evolved with [context - architectural change, migration, new requirements].
551
+
552
+ **Current implementation:**
553
+ ```
554
+ [Code structure, file pattern, or architectural diagram]
555
+ ```
556
+
557
+ ### Key Changes
558
+
559
+ 1. **[Aspect 1]**: [How this changed]
560
+ - Old: [Original approach]
561
+ - New: [Current approach]
562
+
563
+ 2. **[Aspect 2]**: [How this changed]
564
+ - Old: [Original approach]
565
+ - New: [Current approach]
566
+
567
+ 3. **[Integration/Discovery]**: [How developers use this now]
568
+
569
+ ### Examples in Production
570
+
571
+ **Current gems implementing this pattern:**
572
+ - **gem-name**: `path/to/implementation.rb` - [brief description]
573
+ - **gem-name**: `path/to/example.md` - [brief description]
574
+
575
+ ### Relationship to Original Decision
576
+
577
+ The **principles remain valid**:
578
+ - ✅ [Core principle 1 still applies]
579
+ - ✅ [Core principle 2 still applies]
580
+ - ✅ [Core principle 3 still applies]
581
+
582
+ The **implementation evolved**:
583
+ - From: [Original pattern/location]
584
+ - To: [Current pattern/location]
585
+ - Reason: [Why it changed - better modularity, simpler architecture, new requirements]
586
+
587
+ **See ADR-XXX: [New Pattern ADR]** for complete details of the current approach.
588
+ </template>
589
+ </documents>