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,233 @@
1
+ ---
2
+ doc-type: template
3
+ title: [Project Name]
4
+ purpose: Documentation for ace-docs/handbook/templates/project-docs/vision.template.md
5
+ ace-docs:
6
+ last-updated: 2026-01-18
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # [Project Name]
11
+
12
+ <!-- OPTIONAL: Manifesto-style opener for focused vision documents -->
13
+ <!-- Remove this section for comprehensive vision documents -->
14
+
15
+ > **[Key phrase that captures project essence.]** [One to two sentences that
16
+ > expand on the core value proposition and set the tone for the document.]
17
+
18
+ ---
19
+
20
+ ## What We Build
21
+
22
+ <!-- Provide a clear, concise description of what this project does and why it exists -->
23
+ <!-- Keep this focused - 2-3 paragraphs maximum -->
24
+
25
+ [Brief description of the project's core purpose and value proposition]
26
+
27
+ ## Key Features
28
+
29
+ <!-- List the main features and capabilities that define this project -->
30
+ <!-- Use emoji anchors for scannability in longer lists -->
31
+
32
+ - 📦 **Feature 1** - [Description of what this feature does and why it's valuable]
33
+ - 🔍 **Feature 2** - [Description of what this feature does and why it's valuable]
34
+ - ✨ **Feature 3** - [Description of what this feature does and why it's valuable]
35
+ - 🛠️ **Feature 4** - [Description of what this feature does and why it's valuable]
36
+
37
+ ## Core Principles
38
+
39
+ <!-- Fundamental principles that guide the project's development and design decisions -->
40
+ <!-- Use numbered list with emoji anchors for quick scanning -->
41
+
42
+ 1. 🎯 **[Principle 1]** - [Description of this principle and how it influences the project]
43
+ 2. 🧩 **[Principle 2]** - [Description of this principle and how it influences the project]
44
+ 3. 🚀 **[Principle 3]** - [Description of this principle and how it influences the project]
45
+ 4. 🔒 **[Principle 4]** - [Description of this principle and how it influences the project]
46
+
47
+ ## Target Use Cases
48
+
49
+ <!-- Describe the primary scenarios and users this project is designed to serve -->
50
+
51
+ ### Primary Use Cases
52
+
53
+ - **[Use Case 1]** - [Description of who uses this and how]
54
+ - **[Use Case 2]** - [Description of who uses this and how]
55
+ - **[Use Case 3]** - [Description of who uses this and how]
56
+
57
+ ### Secondary Use Cases
58
+
59
+ <!-- OPTIONAL: Include if project has significant secondary uses -->
60
+
61
+ - **[Use Case 4]** - [Description of additional scenarios this project supports]
62
+ - **[Use Case 5]** - [Description of additional scenarios this project supports]
63
+
64
+ ## User Personas
65
+
66
+ <!-- Define the types of users who will interact with this project -->
67
+
68
+ ### Primary Users
69
+
70
+ **[User Type 1]** - [Description of this user group, their needs, and goals]
71
+
72
+ - Needs: [What they need from the project]
73
+ - Goals: [What they want to achieve]
74
+ - Pain Points: [Problems this project solves for them]
75
+
76
+ **[User Type 2]** - [Description of this user group, their needs, and goals]
77
+
78
+ - Needs: [What they need from the project]
79
+ - Goals: [What they want to achieve]
80
+ - Pain Points: [Problems this project solves for them]
81
+
82
+ ### Secondary Users
83
+
84
+ <!-- OPTIONAL: Include if there are significant secondary user groups -->
85
+
86
+ **[User Type 3]** - [Description of additional user groups]
87
+
88
+ - Context: [When and why they interact with the project]
89
+
90
+ ## Success Metrics
91
+
92
+ <!-- Define how success will be measured for this project -->
93
+
94
+ ### Primary Metrics
95
+
96
+ - **[Metric 1]** - [What it measures and target values]
97
+ - **[Metric 2]** - [What it measures and target values]
98
+ - **[Metric 3]** - [What it measures and target values]
99
+
100
+ ### Secondary Metrics
101
+
102
+ <!-- OPTIONAL: Include if tracking additional metrics -->
103
+
104
+ - **[Metric 4]** - [What it measures and why it's important]
105
+ - **[Metric 5]** - [What it measures and why it's important]
106
+
107
+ ## Technology Philosophy
108
+
109
+ <!-- Describe the technical approach and philosophy -->
110
+
111
+ ### Core Technology Choices
112
+
113
+ - **[Technology 1]** - [Why this was chosen and its benefits]
114
+ - **[Technology 2]** - [Why this was chosen and its benefits]
115
+ - **[Technology 3]** - [Why this was chosen and its benefits]
116
+
117
+ ### Technical Principles
118
+
119
+ - **[Technical Principle 1]** - [How this guides technical decisions]
120
+ - **[Technical Principle 2]** - [How this guides technical decisions]
121
+
122
+ ## Project Boundaries
123
+
124
+ ### What We Build
125
+
126
+ <!-- Clearly define what is in scope -->
127
+
128
+ - [Specific capability or feature in scope]
129
+ - [Specific capability or feature in scope]
130
+ - [Specific capability or feature in scope]
131
+
132
+ ### What We Don't Build
133
+
134
+ <!-- Clearly define what is explicitly out of scope -->
135
+
136
+ - [Capability or feature explicitly excluded]
137
+ - [Capability or feature explicitly excluded]
138
+ - [Capability or feature explicitly excluded]
139
+
140
+ ## [Project Structure](./architecture.md)
141
+
142
+ <!-- OPTIONAL: Include high-level structure for context -->
143
+ <!-- Link header to architecture.md for full details -->
144
+
145
+ ```
146
+ project/
147
+ ├── src/ # Source code
148
+ │ ├── components/ # UI components
149
+ │ └── utils/ # Utility functions
150
+ ├── docs/ # Documentation
151
+ │ ├── architecture.md # Technical design
152
+ │ └── vision.md # This document
153
+ └── README.md # Entry point
154
+ ```
155
+
156
+ ## Value Proposition
157
+
158
+ ### Problems We Solve
159
+
160
+ <!-- The specific problems this project addresses -->
161
+
162
+ 1. 🔴 **[Problem 1]** - [Description of the problem and how the project solves it]
163
+ 2. 🟠 **[Problem 2]** - [Description of the problem and how the project solves it]
164
+ 3. 🟡 **[Problem 3]** - [Description of the problem and how the project solves it]
165
+
166
+ ### Unique Advantages
167
+
168
+ <!-- What makes this project different or better than alternatives -->
169
+
170
+ - **[Advantage 1]** - [What makes this unique and valuable]
171
+ - **[Advantage 2]** - [What makes this unique and valuable]
172
+ - **[Advantage 3]** - [What makes this unique and valuable]
173
+
174
+ ## Future Vision
175
+
176
+ ### Short-term Goals (3-6 months)
177
+
178
+ - [Goal 1] - [Description and success criteria]
179
+ - [Goal 2] - [Description and success criteria]
180
+
181
+ ### Medium-term Goals (6-12 months)
182
+
183
+ <!-- OPTIONAL: Include for projects with longer planning horizons -->
184
+
185
+ - [Goal 1] - [Description and success criteria]
186
+ - [Goal 2] - [Description and success criteria]
187
+
188
+ ### Long-term Vision (1+ years)
189
+
190
+ <!-- OPTIONAL: Include for projects with long-term strategic vision -->
191
+
192
+ - [Vision element 1] - [Long-term aspiration]
193
+ - [Vision element 2] - [Long-term aspiration]
194
+
195
+ ## Dependencies and Ecosystem
196
+
197
+ <!-- OPTIONAL: Include for projects with significant external dependencies -->
198
+
199
+ ### Key Dependencies
200
+
201
+ <!-- Important external dependencies that enable this project -->
202
+
203
+ - **[Dependency 1]** - [Why it's needed and how it's used]
204
+ - **[Dependency 2]** - [Why it's needed and how it's used]
205
+
206
+ ### Ecosystem Integration
207
+
208
+ <!-- How this project fits into larger ecosystems or workflows -->
209
+
210
+ - **[Integration 1]** - [How the project connects with other tools/systems]
211
+ - **[Integration 2]** - [How the project connects with other tools/systems]
212
+
213
+ ---
214
+
215
+ ## Template Usage Notes
216
+
217
+ <!-- Remove this section when using the template -->
218
+
219
+ **Comprehensive vs Compact:**
220
+ - For full product documentation - use all sections
221
+ - For focused manifesto-style docs - use opener, What We Build, Core Principles, and Project Boundaries
222
+
223
+ **Styling Conventions:**
224
+ - Use ` - ` (space-hyphen-space) instead of em-dashes
225
+ - Align comments in file tree code blocks
226
+ - Use emoji anchors for numbered principles and feature lists
227
+ - Link headers to related docs when content shows structure
228
+
229
+ See [Markdown Style Guide](guide://markdown-style) for full formatting conventions.
230
+
231
+ ---
232
+
233
+ *This document should be updated as the project evolves and new insights are gained about user needs and project direction.*
@@ -0,0 +1,107 @@
1
+ ---
2
+ doc-type: template
3
+ title: [Feature Name]
4
+ purpose: Documentation for ace-docs/handbook/templates/user-docs/user-guide.template.md
5
+ ace-docs:
6
+ last-updated: 2026-01-08
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # [Feature Name]
11
+
12
+ ## Overview
13
+
14
+ Brief description of what this feature does and why users would want it.
15
+
16
+ ## Quick Start
17
+
18
+ Minimal steps to get started with the most common use case.
19
+
20
+ ```bash
21
+ # Example commands or code
22
+ ```
23
+
24
+ ## Prerequisites
25
+
26
+ - Required dependencies
27
+ - System requirements
28
+ - Access permissions needed
29
+
30
+ ## Installation/Setup
31
+
32
+ Step-by-step setup instructions with examples.
33
+
34
+ ## Basic Usage
35
+
36
+ ### [Common Task 1]
37
+
38
+ How to accomplish the most common task.
39
+
40
+ ```javascript
41
+ // Code example with annotations
42
+ const result = feature.doSomething({
43
+ option1: 'value', // Explanation of option
44
+ option2: true // Why this is needed
45
+ });
46
+ ```
47
+
48
+ ### [Common Task 2]
49
+
50
+ Another common use case with examples.
51
+
52
+ ## Configuration
53
+
54
+ | Option | Type | Default | Description |
55
+ |--------|------|---------|-------------|
56
+ | timeout | number | 30 | Request timeout in seconds |
57
+ | retries | number | 3 | Number of retry attempts |
58
+ | debug | boolean | false | Enable debug logging |
59
+
60
+ ## Advanced Usage
61
+
62
+ ### [Advanced Feature 1]
63
+
64
+ More complex scenarios and patterns.
65
+
66
+ ### Custom Extensions
67
+
68
+ How to extend or customize the feature.
69
+
70
+ ## Troubleshooting
71
+
72
+ ### Common Issues
73
+
74
+ **Problem**: Error message appears
75
+ **Solution**: Steps to resolve
76
+
77
+ **Problem**: Feature doesn't work as expected
78
+ **Solution**: Debugging steps
79
+
80
+ ## Examples
81
+
82
+ ### Example 1: [Use Case]
83
+
84
+ Complete working example with explanation.
85
+
86
+ ### Example 2: [Integration]
87
+
88
+ How to integrate with other tools/features.
89
+
90
+ ## API Reference
91
+
92
+ Link to generated API documentation or inline reference.
93
+
94
+ ## Migration Guide
95
+
96
+ (If applicable) How to migrate from previous versions.
97
+
98
+ ## FAQ
99
+
100
+ **Q: Question users often ask?**
101
+ A: Clear, helpful answer.
102
+
103
+ ## Related Resources
104
+
105
+ - Link to related features
106
+ - External documentation
107
+ - Video tutorials
@@ -0,0 +1,334 @@
1
+ ---
2
+ doc-type: workflow
3
+ title: Create Architecture Decision Record
4
+ purpose: Create structured Architecture Decision Records for significant decisions
5
+ ace-docs:
6
+ last-updated: 2026-02-23
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # Create Architecture Decision Record
11
+
12
+ ## Goal
13
+
14
+ Create a structured Architecture Decision Record (ADR) document in the `docs/decisions/` directory to capture a
15
+ significant architectural decision, its context, rationale, and consequences.
16
+
17
+ ## Prerequisites
18
+
19
+ * A clear architectural problem or choice needs to be documented
20
+ * Understanding of what makes a decision architecturally significant (impacts structure, introduces dependencies,
21
+ changes patterns, affects scalability, etc.)
22
+
23
+ ## Project Context Loading
24
+
25
+ * Read and follow: `ace-bundle wfi://bundle`
26
+
27
+ ## High-Level Execution Plan
28
+
29
+ ### Planning Steps
30
+
31
+ * Identify and validate the architectural
32
+ decision needs documentation
33
+ * Gather comprehensive context and
34
+ alternatives
35
+ * Determine ADR number and file naming
36
+
37
+
38
+ ### Execution Steps
39
+
40
+ * Draft ADR using embedded template
41
+ * Review and validate ADR content
42
+ * Create ADR file in proper location
43
+ * Update docs/decisions.md summary
44
+ * Commit changes
45
+
46
+
47
+ ## When to Create an ADR
48
+
49
+ Create an ADR when:
50
+
51
+ * Choosing between competing libraries or frameworks
52
+ * Defining core interfaces or data structures
53
+ * Changing major workflows or processes
54
+ * Making decisions that affect system architecture
55
+ * Introducing new patterns or technologies
56
+ * Making trade-offs between competing quality attributes (performance vs. maintainability, etc.)
57
+
58
+ ## Process Steps
59
+
60
+ ### 1. Identify Need
61
+
62
+ Determine that a decision warrants an ADR. Ask yourself:
63
+
64
+ * Will this decision affect the system's structure or key abstractions?
65
+ * Are there multiple viable alternatives with different trade-offs?
66
+ * Will future developers need to understand why this choice was made?
67
+ * Could this decision be revisited or changed in the future?
68
+
69
+ ### 2. Gather Context
70
+
71
+ Collect comprehensive information:
72
+
73
+ * What problem are we trying to solve?
74
+ * What are the requirements and constraints?
75
+ * Who are the stakeholders affected?
76
+ * What alternatives have been considered?
77
+ * What are the evaluation criteria?
78
+
79
+ ### 3. Determine ADR Number
80
+
81
+ Check existing ADRs and use next sequential number:
82
+
83
+ # List existing ADRs to find next number
84
+ ls docs/decisions/ADR-*.md | tail -1
85
+
86
+ # Check both active and archived
87
+ ls docs/decisions/archive/ADR-*.md 2>/dev/null | tail -1
88
+ {: .language-bash}
89
+
90
+ Next ADR should be: `ADR-XXX` where XXX is one higher than the last used number.
91
+
92
+ ### 4. Draft ADR
93
+
94
+ Create new file following naming convention:
95
+
96
+ * **File name**: `docs/decisions/ADR-XXX-decision-title.md`
97
+ * **Format**: ADR-001, ADR-002, etc. (zero-padded to 3 digits)
98
+ * **Title**: Use kebab-case for the decision title in filename
99
+
100
+ Use the embedded template below.
101
+
102
+ ### 5. Write Clear Content
103
+
104
+ Follow these principles:
105
+
106
+ **Context Section:**
107
+
108
+ * Explain the "why" comprehensively
109
+ * Future readers should understand the situation without additional context
110
+ * Include technical background and business drivers
111
+
112
+ **Decision Section:**
113
+
114
+ * State what you're doing, not what you're thinking about doing
115
+ * Be definitive and unambiguous
116
+ * Specify technologies, versions, and approaches
117
+
118
+ **Consequences Section:**
119
+
120
+ * Be balanced and honest
121
+ * Include both immediate and long-term impacts
122
+ * Document trade-offs explicitly
123
+ * Group into Positive, Negative, and Neutral
124
+
125
+ **Alternatives Section:**
126
+
127
+ * Document viable alternatives seriously considered
128
+ * Explain why each alternative was rejected
129
+ * Avoid straw man arguments
130
+
131
+ ### 6. Review
132
+
133
+ Before finalizing, verify:
134
+
135
+ * Is the context clear to someone unfamiliar with current discussions?
136
+ * Is the decision stated unambiguously?
137
+ * Are all significant consequences documented?
138
+ * Would a developer in 2 years understand why this decision was made?
139
+ * Are alternatives documented with fair treatment?
140
+
141
+ ### 7. Validate
142
+
143
+ Use ace-docs to validate the ADR:
144
+
145
+ # Validate syntax and required fields
146
+ ace-docs validate docs/decisions/ADR-XXX-*.md
147
+
148
+ # Check for common issues
149
+ ace-lint docs/decisions/ADR-XXX-*.md
150
+ {: .language-bash}
151
+
152
+ ### 8. Update docs/decisions.md
153
+
154
+ Add the new ADR to the summary document:
155
+
156
+ 1. Determine appropriate section (Active Decisions, Gem Architecture, etc.)
157
+ 2. Add entry following pattern:
158
+ ^
159
+
160
+ ### Decision Title
161
+ **Decision**: Brief summary of what was decided
162
+ **Impact**: How this affects developers and agents
163
+ **Details**: [ADR-XXX](decisions/ADR-XXX-decision-title.md)
164
+ {: .language-markdown}
165
+
166
+ 1. Maintain alphabetical or logical grouping within section
167
+
168
+ ### 9. Save and Commit
169
+
170
+ # Stage changes
171
+ git add docs/decisions/ADR-XXX-*.md docs/decisions.md
172
+
173
+ # Commit with descriptive message
174
+ git commit -m "docs: Add ADR-XXX for [decision topic]"
175
+ {: .language-bash}
176
+
177
+ Or use ace-git-commit:
178
+
179
+ ace-git-commit docs/decisions/ -i "Add ADR for [decision topic]"
180
+ {: .language-bash}
181
+
182
+ ## ADR Writing Best Practices
183
+
184
+ ### DO
185
+
186
+ * Write in full sentences with proper grammar
187
+ * Use present tense for context and decision
188
+ * Be specific about technologies, versions, and constraints
189
+ * Include enough detail that the ADR stands alone
190
+ * Link to external resources for deep dives
191
+ * Number ADRs sequentially (ADR-001, ADR-002, etc.)
192
+ * Date the decision with ISO format (YYYY-MM-DD)
193
+
194
+ ### DON'T
195
+
196
+ * Write novels - be concise but complete
197
+ * Use ambiguous language ("might", "could", "should consider")
198
+ * Forget to date the decision
199
+ * Skip documenting rejected alternatives
200
+ * Make the status "Accepted" until actually accepted
201
+ * Include implementation details better suited for code comments
202
+
203
+ ## Examples of Good ADR Titles
204
+
205
+ * ADR-001-use-react-for-frontend
206
+ * ADR-002-adopt-microservices-architecture
207
+ * ADR-003-implement-event-sourcing
208
+ * ADR-004-choose-postgresql-over-mongodb
209
+ * ADR-005-use-jwt-for-authentication
210
+ * ADR-015-mono-repo-ace-gems-migration
211
+ * ADR-016-handbook-directory-architecture
212
+
213
+ ## After Creation: ADR Lifecycle
214
+
215
+ ADRs may need maintenance over time as patterns evolve or become obsolete:
216
+
217
+ * **Evolution**: Patterns change but principles remain valid → add evolution sections
218
+ * **Archival**: Patterns no longer used in current codebase → move to archive
219
+ * **Scope Updates**: Implementation details change → update scope notes
220
+
221
+ See `wfi://docs/maintain-adrs` for complete lifecycle management.
222
+
223
+ ## Input
224
+
225
+ * Decision context, rationale, and chosen approach
226
+ * Information about alternatives considered
227
+ * Stakeholder concerns and constraints
228
+ * Evaluation criteria used
229
+
230
+ ## Output / Success Criteria
231
+
232
+ * A new ADR `.md` file is created in `docs/decisions/`
233
+ * The ADR follows the template structure completely
234
+ * The problem, decision, and rationale are clearly documented
235
+ * All significant consequences (positive, negative, neutral) are recorded
236
+ * Viable alternatives and rejection reasons are documented
237
+ * The document is self-contained and understandable without external context
238
+ * docs/decisions.md summary is updated
239
+ * Changes are committed to version control
240
+
241
+ ## Troubleshooting
242
+
243
+ **Cannot determine next ADR number:**
244
+
245
+ * Check both `docs/decisions/ADR-*.md` and `docs/decisions/archive/ADR-*.md`
246
+ * Look at the highest number used across both locations
247
+ * Use next sequential number
248
+
249
+ **Validation fails:**
250
+
251
+ * Check frontmatter is present and valid
252
+ * Verify all required sections exist
253
+ * Run `ace-docs validate` for specific errors
254
+
255
+ **Unsure if decision needs ADR:**
256
+
257
+ * Ask: "Will this be hard to reverse?"
258
+ * Ask: "Will future developers wonder why we did this?"
259
+ * Ask: "Are there multiple valid alternatives?"
260
+ * If yes to any, create the ADR
261
+
262
+ <documents>
263
+ <template path="tmpl://project-docs/decisions/adr"># ADR-XXX: Title of the Decision
264
+
265
+ ## Status
266
+
267
+ Proposed | Accepted | Deprecated | Superseded
268
+ Date: YYYY-MM-DD
269
+
270
+ ## Context
271
+
272
+ Describe the architectural problem or opportunity. Include:
273
+ - The forces at play (technical, business, regulatory)
274
+ - The current situation that led to this decision
275
+ - Why this decision is necessary now
276
+ - Key stakeholders and their concerns
277
+
278
+ ## Decision
279
+
280
+ We will [describe the decision in clear, active voice].
281
+
282
+ Key aspects of this decision:
283
+ - [Specific technology, pattern, or approach chosen]
284
+ - [Key implementation details or principles]
285
+ - [Boundaries and scope of the decision]
286
+
287
+ ## Consequences
288
+
289
+ ### Positive
290
+
291
+ - [Benefit or advantage gained]
292
+ - [Improved capability or reduced complexity]
293
+ - [Alignment with other goals or decisions]
294
+
295
+ ### Negative
296
+
297
+ - [Cost or limitation introduced]
298
+ - [Increased complexity or maintenance burden]
299
+ - [Trade-off made against other quality attributes]
300
+
301
+ ### Neutral
302
+
303
+ - [Impact that is neither clearly positive nor negative]
304
+ - [Change that shifts rather than eliminates complexity]
305
+
306
+ ## Alternatives Considered
307
+
308
+ ### Alternative 1: [Name]
309
+
310
+ - **Description**: [Brief description]
311
+ - **Pros**: [Advantages]
312
+ - **Cons**: [Disadvantages]
313
+ - **Why not chosen**: [Specific reasons for rejection]
314
+
315
+ ### Alternative 2: [Name]
316
+
317
+ - **Description**: [Brief description]
318
+ - **Pros**: [Advantages]
319
+ - **Cons**: [Disadvantages]
320
+ - **Why not chosen**: [Specific reasons for rejection]
321
+
322
+ ## Related Decisions
323
+
324
+ - [Link to related ADRs]
325
+ - [Reference to superseded decisions]
326
+ - [Dependencies on other architectural decisions]
327
+
328
+ ## References
329
+
330
+ - [Link to relevant documentation]
331
+ - [Reference to external resources]
332
+ - [Related GitHub issues or pull requests]
333
+ </template>
334
+ </documents>