@mytechtoday/augment-extensions 1.2.2 → 1.3.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.
- package/augment-extensions/visual-design/CHANGELOG.md +132 -0
- package/augment-extensions/visual-design/README.md +255 -0
- package/augment-extensions/visual-design/__tests__/README.md +119 -0
- package/augment-extensions/visual-design/__tests__/style-selector.test.ts +172 -0
- package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +214 -0
- package/augment-extensions/visual-design/domains/other/ai-prompt-helper.ts +157 -0
- package/augment-extensions/visual-design/domains/other/dotnet-application.ts +156 -0
- package/augment-extensions/visual-design/domains/other/linux-platform.ts +156 -0
- package/augment-extensions/visual-design/domains/other/mobile-application.ts +157 -0
- package/augment-extensions/visual-design/domains/other/motion-picture.ts +156 -0
- package/augment-extensions/visual-design/domains/other/os-application.ts +156 -0
- package/augment-extensions/visual-design/domains/other/print-campaigns.ts +158 -0
- package/augment-extensions/visual-design/domains/other/web-app.ts +157 -0
- package/augment-extensions/visual-design/domains/other/website.ts +161 -0
- package/augment-extensions/visual-design/domains/other/windows-platform.ts +156 -0
- package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +506 -0
- package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +615 -0
- package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +531 -0
- package/augment-extensions/visual-design/examples/README.md +97 -0
- package/augment-extensions/visual-design/examples/ai-prompt-generation.md +233 -0
- package/augment-extensions/visual-design/examples/basic-usage.md +216 -0
- package/augment-extensions/visual-design/examples/domain-workflows.md +257 -0
- package/augment-extensions/visual-design/examples/vendor-comparison.md +247 -0
- package/augment-extensions/visual-design/module.json +78 -0
- package/augment-extensions/visual-design/style-selector.ts +177 -0
- package/augment-extensions/visual-design/types.ts +302 -0
- package/augment-extensions/visual-design/visual-design-core.ts +469 -0
- package/augment-extensions/workflows/adr-support/README.md +227 -0
- package/augment-extensions/workflows/adr-support/__tests__/adr-validator.test.ts +203 -0
- package/augment-extensions/workflows/adr-support/adr-validator.ts +162 -0
- package/augment-extensions/workflows/adr-support/examples/complete-lifecycle-example.md +449 -0
- package/augment-extensions/workflows/adr-support/examples/integration-example.md +580 -0
- package/augment-extensions/workflows/adr-support/examples/superseding-example.md +436 -0
- package/augment-extensions/workflows/adr-support/module.json +112 -0
- package/augment-extensions/workflows/adr-support/rules/adr-creation.md +372 -0
- package/augment-extensions/workflows/adr-support/rules/beads-integration.md +443 -0
- package/augment-extensions/workflows/adr-support/rules/conflict-detection.md +486 -0
- package/augment-extensions/workflows/adr-support/rules/decision-detection.md +362 -0
- package/augment-extensions/workflows/adr-support/rules/lifecycle-management.md +427 -0
- package/augment-extensions/workflows/adr-support/rules/openspec-integration.md +465 -0
- package/augment-extensions/workflows/adr-support/rules/template-selection.md +405 -0
- package/augment-extensions/workflows/adr-support/rules/validation-rules.md +543 -0
- package/augment-extensions/workflows/adr-support/schemas/adr-config.json +191 -0
- package/augment-extensions/workflows/adr-support/schemas/adr-metadata.json +172 -0
- package/augment-extensions/workflows/adr-support/templates/business-case.md +235 -0
- package/augment-extensions/workflows/adr-support/templates/madr-elaborate.md +197 -0
- package/augment-extensions/workflows/adr-support/templates/madr-simple.md +68 -0
- package/augment-extensions/workflows/adr-support/templates/nygard.md +84 -0
- package/cli/dist/utils/__tests__/adr-validator.example.d.ts +6 -0
- package/cli/dist/utils/__tests__/adr-validator.example.d.ts.map +1 -0
- package/cli/dist/utils/__tests__/adr-validator.example.js +148 -0
- package/cli/dist/utils/__tests__/adr-validator.example.js.map +1 -0
- package/cli/dist/utils/adr-validator.d.ts +65 -0
- package/cli/dist/utils/adr-validator.d.ts.map +1 -0
- package/cli/dist/utils/adr-validator.js +203 -0
- package/cli/dist/utils/adr-validator.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
# Template Selection Rules
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document defines how to select the appropriate ADR template based on decision type, complexity, and context. Choosing the right template ensures ADRs are appropriately detailed without being overly burdensome.
|
|
6
|
+
|
|
7
|
+
## Available Templates
|
|
8
|
+
|
|
9
|
+
### 1. Michael Nygard Template (Nygard)
|
|
10
|
+
|
|
11
|
+
**File:** `templates/nygard.md`
|
|
12
|
+
|
|
13
|
+
**Structure:**
|
|
14
|
+
- Title
|
|
15
|
+
- Status
|
|
16
|
+
- Context
|
|
17
|
+
- Decision
|
|
18
|
+
- Consequences
|
|
19
|
+
|
|
20
|
+
**Best For:**
|
|
21
|
+
- Simple, straightforward decisions
|
|
22
|
+
- Quick decisions with clear context
|
|
23
|
+
- Decisions with obvious trade-offs
|
|
24
|
+
- When brevity is important
|
|
25
|
+
|
|
26
|
+
**Characteristics:**
|
|
27
|
+
- Minimal structure
|
|
28
|
+
- Fast to complete
|
|
29
|
+
- Easy to read
|
|
30
|
+
- Focuses on essentials
|
|
31
|
+
|
|
32
|
+
**Example Use Cases:**
|
|
33
|
+
- "Use PostgreSQL for primary database"
|
|
34
|
+
- "Adopt ESLint for code linting"
|
|
35
|
+
- "Use JWT for authentication tokens"
|
|
36
|
+
|
|
37
|
+
### 2. MADR Simple Template
|
|
38
|
+
|
|
39
|
+
**File:** `templates/madr-simple.md`
|
|
40
|
+
|
|
41
|
+
**Structure:**
|
|
42
|
+
- Title and metadata
|
|
43
|
+
- Context and Problem Statement
|
|
44
|
+
- Decision Drivers
|
|
45
|
+
- Considered Options
|
|
46
|
+
- Decision Outcome
|
|
47
|
+
- Consequences
|
|
48
|
+
|
|
49
|
+
**Best For:**
|
|
50
|
+
- Standard decisions (most common)
|
|
51
|
+
- Decisions with 2-4 alternatives
|
|
52
|
+
- When decision drivers are important
|
|
53
|
+
- Balanced detail level
|
|
54
|
+
|
|
55
|
+
**Characteristics:**
|
|
56
|
+
- Structured but not overwhelming
|
|
57
|
+
- Captures alternatives considered
|
|
58
|
+
- Documents decision drivers
|
|
59
|
+
- Good for team review
|
|
60
|
+
|
|
61
|
+
**Example Use Cases:**
|
|
62
|
+
- "Select state management library (Redux vs MobX vs Zustand)"
|
|
63
|
+
- "Choose deployment platform (AWS vs Azure vs GCP)"
|
|
64
|
+
- "Pick testing framework (Jest vs Vitest vs Mocha)"
|
|
65
|
+
|
|
66
|
+
### 3. MADR Elaborate Template
|
|
67
|
+
|
|
68
|
+
**File:** `templates/madr-elaborate.md`
|
|
69
|
+
|
|
70
|
+
**Structure:**
|
|
71
|
+
- Title and metadata
|
|
72
|
+
- Context and Problem Statement
|
|
73
|
+
- Decision Drivers
|
|
74
|
+
- Considered Options (with detailed pros/cons)
|
|
75
|
+
- Decision Outcome
|
|
76
|
+
- Validation
|
|
77
|
+
- Consequences
|
|
78
|
+
- Confirmation
|
|
79
|
+
|
|
80
|
+
**Best For:**
|
|
81
|
+
- Complex decisions with many alternatives
|
|
82
|
+
- High-stakes decisions
|
|
83
|
+
- Decisions requiring detailed analysis
|
|
84
|
+
- When stakeholder buy-in is critical
|
|
85
|
+
|
|
86
|
+
**Characteristics:**
|
|
87
|
+
- Comprehensive structure
|
|
88
|
+
- Detailed pros/cons for each option
|
|
89
|
+
- Validation and confirmation sections
|
|
90
|
+
- Takes more time to complete
|
|
91
|
+
|
|
92
|
+
**Example Use Cases:**
|
|
93
|
+
- "Migrate from monolith to microservices"
|
|
94
|
+
- "Select enterprise database (PostgreSQL vs Oracle vs SQL Server)"
|
|
95
|
+
- "Choose cloud provider for multi-year commitment"
|
|
96
|
+
|
|
97
|
+
### 4. Business Case Template
|
|
98
|
+
|
|
99
|
+
**File:** `templates/business-case.md`
|
|
100
|
+
|
|
101
|
+
**Structure:**
|
|
102
|
+
- Executive Summary
|
|
103
|
+
- Problem Statement
|
|
104
|
+
- Proposed Solution
|
|
105
|
+
- Cost Analysis
|
|
106
|
+
- ROI Projection
|
|
107
|
+
- Risk Assessment
|
|
108
|
+
- Implementation Plan
|
|
109
|
+
- Success Metrics
|
|
110
|
+
|
|
111
|
+
**Best For:**
|
|
112
|
+
- Decisions with significant cost implications
|
|
113
|
+
- When ROI justification is needed
|
|
114
|
+
- Vendor selection decisions
|
|
115
|
+
- Budget approval required
|
|
116
|
+
|
|
117
|
+
**Characteristics:**
|
|
118
|
+
- Business-focused language
|
|
119
|
+
- Financial analysis
|
|
120
|
+
- Risk/benefit quantification
|
|
121
|
+
- Executive-friendly format
|
|
122
|
+
|
|
123
|
+
**Example Use Cases:**
|
|
124
|
+
- "Purchase enterprise monitoring solution"
|
|
125
|
+
- "Hire dedicated DevOps team"
|
|
126
|
+
- "Migrate to cloud infrastructure"
|
|
127
|
+
|
|
128
|
+
## Selection Decision Tree
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Start
|
|
132
|
+
↓
|
|
133
|
+
Does decision have significant cost/ROI implications?
|
|
134
|
+
├─ Yes → Business Case Template
|
|
135
|
+
└─ No → Continue
|
|
136
|
+
↓
|
|
137
|
+
How many alternatives are being seriously considered?
|
|
138
|
+
├─ 1-2 → Continue
|
|
139
|
+
│ ↓
|
|
140
|
+
│ Is decision straightforward with clear trade-offs?
|
|
141
|
+
│ ├─ Yes → Nygard Template
|
|
142
|
+
│ └─ No → MADR Simple Template
|
|
143
|
+
│
|
|
144
|
+
└─ 3+ → Continue
|
|
145
|
+
↓
|
|
146
|
+
Is this a high-stakes decision requiring detailed analysis?
|
|
147
|
+
├─ Yes → MADR Elaborate Template
|
|
148
|
+
└─ No → MADR Simple Template
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Selection Criteria
|
|
152
|
+
|
|
153
|
+
### Complexity Assessment
|
|
154
|
+
|
|
155
|
+
**Low Complexity → Nygard**
|
|
156
|
+
- Single clear option
|
|
157
|
+
- Obvious trade-offs
|
|
158
|
+
- Limited stakeholders
|
|
159
|
+
- Low risk
|
|
160
|
+
|
|
161
|
+
**Medium Complexity → MADR Simple**
|
|
162
|
+
- 2-4 alternatives
|
|
163
|
+
- Multiple decision drivers
|
|
164
|
+
- Several stakeholders
|
|
165
|
+
- Moderate risk
|
|
166
|
+
|
|
167
|
+
**High Complexity → MADR Elaborate**
|
|
168
|
+
- 5+ alternatives
|
|
169
|
+
- Complex trade-offs
|
|
170
|
+
- Many stakeholders
|
|
171
|
+
- High risk/impact
|
|
172
|
+
|
|
173
|
+
**Financial Focus → Business Case**
|
|
174
|
+
- Significant cost
|
|
175
|
+
- ROI justification needed
|
|
176
|
+
- Budget approval required
|
|
177
|
+
- Executive stakeholders
|
|
178
|
+
|
|
179
|
+
### Decision Type Mapping
|
|
180
|
+
|
|
181
|
+
| Decision Type | Recommended Template | Rationale |
|
|
182
|
+
|--------------|---------------------|-----------|
|
|
183
|
+
| Technology selection (simple) | Nygard | Quick, clear choice |
|
|
184
|
+
| Technology selection (complex) | MADR Simple | Multiple options to evaluate |
|
|
185
|
+
| Architecture pattern | MADR Elaborate | High impact, needs analysis |
|
|
186
|
+
| Tool/library selection | MADR Simple | Standard evaluation process |
|
|
187
|
+
| Infrastructure change | MADR Simple or Elaborate | Depends on complexity |
|
|
188
|
+
| Vendor selection | Business Case | Cost and ROI important |
|
|
189
|
+
| Process change | Nygard or MADR Simple | Depends on impact |
|
|
190
|
+
| Security decision | MADR Elaborate | High stakes, needs detail |
|
|
191
|
+
| Performance optimization | Nygard or MADR Simple | Depends on scope |
|
|
192
|
+
| Deprecation decision | MADR Simple | Need to document alternatives |
|
|
193
|
+
|
|
194
|
+
### Stakeholder Considerations
|
|
195
|
+
|
|
196
|
+
**Few Stakeholders (1-3) → Nygard or MADR Simple**
|
|
197
|
+
- Faster consensus
|
|
198
|
+
- Less formal review needed
|
|
199
|
+
- Can iterate quickly
|
|
200
|
+
|
|
201
|
+
**Many Stakeholders (4+) → MADR Elaborate or Business Case**
|
|
202
|
+
- Need comprehensive documentation
|
|
203
|
+
- Formal review process
|
|
204
|
+
- Multiple perspectives to capture
|
|
205
|
+
|
|
206
|
+
### Time Constraints
|
|
207
|
+
|
|
208
|
+
**Urgent Decision → Nygard**
|
|
209
|
+
- Need to document quickly
|
|
210
|
+
- Can elaborate later if needed
|
|
211
|
+
- Focus on essentials
|
|
212
|
+
|
|
213
|
+
**Standard Timeline → MADR Simple**
|
|
214
|
+
- Balanced approach
|
|
215
|
+
- Adequate time for review
|
|
216
|
+
- Good detail level
|
|
217
|
+
|
|
218
|
+
**Extended Timeline → MADR Elaborate or Business Case**
|
|
219
|
+
- Time for thorough analysis
|
|
220
|
+
- Multiple review cycles
|
|
221
|
+
- Comprehensive documentation
|
|
222
|
+
|
|
223
|
+
## AI Agent Selection Logic
|
|
224
|
+
|
|
225
|
+
### Automatic Template Recommendation
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
function recommendTemplate(decision: DecisionContext): Template {
|
|
229
|
+
// Check for financial implications
|
|
230
|
+
if (decision.hasCostImplications && decision.estimatedCost > threshold) {
|
|
231
|
+
return Template.BusinessCase;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Check complexity
|
|
235
|
+
const complexity = assessComplexity(decision);
|
|
236
|
+
const alternativesCount = decision.alternatives.length;
|
|
237
|
+
|
|
238
|
+
if (complexity === 'low' && alternativesCount <= 2) {
|
|
239
|
+
return Template.Nygard;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (complexity === 'high' || alternativesCount >= 5) {
|
|
243
|
+
return Template.MADRElaborate;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Default to MADR Simple for most cases
|
|
247
|
+
return Template.MADRSimple;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function assessComplexity(decision: DecisionContext): 'low' | 'medium' | 'high' {
|
|
251
|
+
let score = 0;
|
|
252
|
+
|
|
253
|
+
// Factor in various complexity indicators
|
|
254
|
+
if (decision.stakeholders.length > 5) score += 2;
|
|
255
|
+
if (decision.affectedSystems.length > 3) score += 2;
|
|
256
|
+
if (decision.isReversible === false) score += 2;
|
|
257
|
+
if (decision.riskLevel === 'high') score += 3;
|
|
258
|
+
if (decision.alternatives.length > 4) score += 2;
|
|
259
|
+
|
|
260
|
+
if (score <= 3) return 'low';
|
|
261
|
+
if (score <= 7) return 'medium';
|
|
262
|
+
return 'high';
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### User Prompt for Template Selection
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
I recommend the MADR Simple template for this decision because:
|
|
270
|
+
- You're evaluating 3 alternatives (PostgreSQL, MySQL, MongoDB)
|
|
271
|
+
- Decision has moderate complexity
|
|
272
|
+
- Multiple stakeholders involved
|
|
273
|
+
- Standard evaluation process
|
|
274
|
+
|
|
275
|
+
Would you like to:
|
|
276
|
+
1. Use MADR Simple (recommended)
|
|
277
|
+
2. Use Nygard (simpler, faster)
|
|
278
|
+
3. Use MADR Elaborate (more detailed)
|
|
279
|
+
4. Use Business Case (cost-focused)
|
|
280
|
+
|
|
281
|
+
[1] [2] [3] [4]
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Template Switching
|
|
285
|
+
|
|
286
|
+
### When to Switch Templates
|
|
287
|
+
|
|
288
|
+
**Upgrade to More Detailed Template:**
|
|
289
|
+
- Decision becomes more complex than initially thought
|
|
290
|
+
- Additional alternatives discovered
|
|
291
|
+
- Stakeholder requests more detail
|
|
292
|
+
- Risk level increases
|
|
293
|
+
|
|
294
|
+
**Downgrade to Simpler Template:**
|
|
295
|
+
- Decision simpler than expected
|
|
296
|
+
- Time constraints require faster documentation
|
|
297
|
+
- Stakeholders prefer brevity
|
|
298
|
+
- Low-risk decision
|
|
299
|
+
|
|
300
|
+
### How to Switch Templates
|
|
301
|
+
|
|
302
|
+
1. **Copy existing content** to new template
|
|
303
|
+
2. **Map sections** from old to new template
|
|
304
|
+
3. **Fill in additional sections** if upgrading
|
|
305
|
+
4. **Preserve all context** and decisions
|
|
306
|
+
5. **Update metadata** to reflect template change
|
|
307
|
+
|
|
308
|
+
## Best Practices
|
|
309
|
+
|
|
310
|
+
1. **Start Simple, Elaborate if Needed**
|
|
311
|
+
- Begin with Nygard or MADR Simple
|
|
312
|
+
- Upgrade if complexity warrants
|
|
313
|
+
- Don't over-engineer documentation
|
|
314
|
+
|
|
315
|
+
2. **Consider Your Audience**
|
|
316
|
+
- Technical team → Nygard or MADR Simple
|
|
317
|
+
- Executive stakeholders → Business Case
|
|
318
|
+
- Mixed audience → MADR Elaborate
|
|
319
|
+
|
|
320
|
+
3. **Match Template to Decision Impact**
|
|
321
|
+
- Low impact → Nygard
|
|
322
|
+
- Medium impact → MADR Simple
|
|
323
|
+
- High impact → MADR Elaborate or Business Case
|
|
324
|
+
|
|
325
|
+
4. **Respect Time Constraints**
|
|
326
|
+
- Urgent → Nygard
|
|
327
|
+
- Standard → MADR Simple
|
|
328
|
+
- Extended → MADR Elaborate
|
|
329
|
+
|
|
330
|
+
5. **Allow Template Override**
|
|
331
|
+
- AI recommendation is a suggestion
|
|
332
|
+
- User knows context best
|
|
333
|
+
- Support manual template selection
|
|
334
|
+
|
|
335
|
+
## Examples
|
|
336
|
+
|
|
337
|
+
### Example 1: Simple Decision → Nygard
|
|
338
|
+
|
|
339
|
+
**Decision:** "Use Prettier for code formatting"
|
|
340
|
+
|
|
341
|
+
**Why Nygard:**
|
|
342
|
+
- Single clear option (Prettier)
|
|
343
|
+
- Straightforward decision
|
|
344
|
+
- Low complexity
|
|
345
|
+
- Quick to document
|
|
346
|
+
|
|
347
|
+
### Example 2: Standard Decision → MADR Simple
|
|
348
|
+
|
|
349
|
+
**Decision:** "Select state management library"
|
|
350
|
+
|
|
351
|
+
**Why MADR Simple:**
|
|
352
|
+
- 3 alternatives (Redux, MobX, Zustand)
|
|
353
|
+
- Multiple decision drivers (learning curve, bundle size, DevTools)
|
|
354
|
+
- Standard evaluation process
|
|
355
|
+
- Moderate complexity
|
|
356
|
+
|
|
357
|
+
### Example 3: Complex Decision → MADR Elaborate
|
|
358
|
+
|
|
359
|
+
**Decision:** "Migrate to microservices architecture"
|
|
360
|
+
|
|
361
|
+
**Why MADR Elaborate:**
|
|
362
|
+
- High-stakes decision
|
|
363
|
+
- Multiple architectural patterns to consider
|
|
364
|
+
- Many stakeholders (dev team, ops, management)
|
|
365
|
+
- Significant consequences
|
|
366
|
+
- Need detailed analysis
|
|
367
|
+
|
|
368
|
+
### Example 4: Financial Decision → Business Case
|
|
369
|
+
|
|
370
|
+
**Decision:** "Purchase Datadog for monitoring"
|
|
371
|
+
|
|
372
|
+
**Why Business Case:**
|
|
373
|
+
- Significant annual cost ($50k+)
|
|
374
|
+
- ROI justification needed
|
|
375
|
+
- Budget approval required
|
|
376
|
+
- Executive stakeholders
|
|
377
|
+
- Need cost/benefit analysis
|
|
378
|
+
|
|
379
|
+
## Configuration
|
|
380
|
+
|
|
381
|
+
Projects can configure template preferences in `.adr-config.json`:
|
|
382
|
+
|
|
383
|
+
```json
|
|
384
|
+
{
|
|
385
|
+
"templates": {
|
|
386
|
+
"default": "madr-simple",
|
|
387
|
+
"autoSelect": true,
|
|
388
|
+
"allowOverride": true,
|
|
389
|
+
"complexityThresholds": {
|
|
390
|
+
"low": 3,
|
|
391
|
+
"medium": 7
|
|
392
|
+
},
|
|
393
|
+
"costThreshold": 10000
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## See Also
|
|
399
|
+
|
|
400
|
+
- [ADR Creation Guidelines](./adr-creation.md)
|
|
401
|
+
- [Nygard Template](../templates/nygard.md)
|
|
402
|
+
- [MADR Simple Template](../templates/madr-simple.md)
|
|
403
|
+
- [MADR Elaborate Template](../templates/madr-elaborate.md)
|
|
404
|
+
- [Business Case Template](../templates/business-case.md)
|
|
405
|
+
|