@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,372 @@
|
|
|
1
|
+
# ADR Creation Guidelines
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document defines the process for creating Architecture Decision Records (ADRs), including automation, metadata generation, context extraction, and file creation workflow.
|
|
6
|
+
|
|
7
|
+
## Creation Workflow
|
|
8
|
+
|
|
9
|
+
### Step 1: Initiate ADR Creation
|
|
10
|
+
|
|
11
|
+
ADRs can be created through:
|
|
12
|
+
|
|
13
|
+
1. **Automatic Detection** - AI agent detects decision and prompts user
|
|
14
|
+
2. **Manual Request** - User explicitly requests ADR creation
|
|
15
|
+
3. **Workflow Integration** - Created as part of OpenSpec/Beads workflow
|
|
16
|
+
|
|
17
|
+
### Step 2: Gather Decision Information
|
|
18
|
+
|
|
19
|
+
Collect the following information:
|
|
20
|
+
|
|
21
|
+
#### Required Information
|
|
22
|
+
- **Title**: Brief, descriptive decision title
|
|
23
|
+
- **Status**: Initial status (usually "draft" or "proposed")
|
|
24
|
+
- **Decision**: What are we doing?
|
|
25
|
+
- **Context**: Why are we making this decision?
|
|
26
|
+
|
|
27
|
+
#### Optional Information
|
|
28
|
+
- **Alternatives Considered**: What other options were evaluated?
|
|
29
|
+
- **Consequences**: What are the expected outcomes?
|
|
30
|
+
- **Related Decisions**: Links to other ADRs
|
|
31
|
+
- **Related Specs**: Links to OpenSpec documents
|
|
32
|
+
- **Related Tasks**: Links to Beads tasks
|
|
33
|
+
|
|
34
|
+
### Step 3: Select Template
|
|
35
|
+
|
|
36
|
+
Choose appropriate template based on decision type:
|
|
37
|
+
|
|
38
|
+
| Decision Type | Template | Use When |
|
|
39
|
+
|--------------|----------|----------|
|
|
40
|
+
| Simple, straightforward | Nygard | Quick decisions, clear context |
|
|
41
|
+
| Standard decision | MADR Simple | Most common use case |
|
|
42
|
+
| Complex with options | MADR Elaborate | Multiple alternatives evaluated |
|
|
43
|
+
| Cost/ROI focused | Business Case | Financial implications important |
|
|
44
|
+
|
|
45
|
+
See [Template Selection Rules](./template-selection.md) for detailed guidance.
|
|
46
|
+
|
|
47
|
+
### Step 4: Generate Metadata
|
|
48
|
+
|
|
49
|
+
Create frontmatter with required and optional fields:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
---
|
|
53
|
+
# Required fields
|
|
54
|
+
id: adr-NNNN
|
|
55
|
+
title: "Use PostgreSQL for Primary Database"
|
|
56
|
+
status: proposed
|
|
57
|
+
date: 2026-02-05
|
|
58
|
+
deciders: ["kyle@mytech.today", "team-lead"]
|
|
59
|
+
|
|
60
|
+
# Optional fields
|
|
61
|
+
tags: ["database", "infrastructure", "postgresql"]
|
|
62
|
+
supersedes: []
|
|
63
|
+
superseded_by: null
|
|
64
|
+
related_decisions: []
|
|
65
|
+
related_specs: ["openspec/specs/database/schema.md"]
|
|
66
|
+
related_tasks: ["bd-db01", "bd-db02"]
|
|
67
|
+
---
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
#### Metadata Field Definitions
|
|
71
|
+
|
|
72
|
+
**Required Fields:**
|
|
73
|
+
- `id`: Unique identifier (format: `adr-NNNN` where NNNN is zero-padded number)
|
|
74
|
+
- `title`: Descriptive title (50-80 characters)
|
|
75
|
+
- `status`: Current status (see [Lifecycle Management](./lifecycle-management.md))
|
|
76
|
+
- `date`: Creation date (ISO 8601 format: YYYY-MM-DD)
|
|
77
|
+
- `deciders`: Array of people who made/approved the decision
|
|
78
|
+
|
|
79
|
+
**Optional Fields:**
|
|
80
|
+
- `tags`: Array of relevant tags for categorization
|
|
81
|
+
- `supersedes`: Array of ADR IDs this decision replaces
|
|
82
|
+
- `superseded_by`: ADR ID that replaces this decision (null if active)
|
|
83
|
+
- `related_decisions`: Array of related ADR IDs
|
|
84
|
+
- `related_specs`: Array of OpenSpec file paths
|
|
85
|
+
- `related_tasks`: Array of Beads task IDs
|
|
86
|
+
|
|
87
|
+
### Step 5: Extract Context
|
|
88
|
+
|
|
89
|
+
Automatically extract context from:
|
|
90
|
+
|
|
91
|
+
#### Code Context
|
|
92
|
+
```typescript
|
|
93
|
+
// Example: Detecting database decision from code
|
|
94
|
+
const codeContext = {
|
|
95
|
+
trigger: "New dependency: @prisma/client",
|
|
96
|
+
files: ["package.json", "src/db/client.ts"],
|
|
97
|
+
changes: "Added Prisma ORM for database access"
|
|
98
|
+
};
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Conversation Context
|
|
102
|
+
```typescript
|
|
103
|
+
// Example: Extracting from conversation
|
|
104
|
+
const conversationContext = {
|
|
105
|
+
problem: "Need type-safe database queries",
|
|
106
|
+
alternatives: ["Prisma", "TypeORM", "Sequelize"],
|
|
107
|
+
criteria: ["Type safety", "Performance", "Developer experience"]
|
|
108
|
+
};
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Workflow Context
|
|
112
|
+
```typescript
|
|
113
|
+
// Example: From OpenSpec change
|
|
114
|
+
const workflowContext = {
|
|
115
|
+
spec: "openspec/specs/database/schema.md",
|
|
116
|
+
change: "openspec/changes/add-user-sessions/",
|
|
117
|
+
tasks: ["bd-db01", "bd-db02"]
|
|
118
|
+
};
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Step 6: Create ADR File
|
|
122
|
+
|
|
123
|
+
#### File Naming Convention
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
adr/NNNN-brief-title.md
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Rules:**
|
|
130
|
+
- `NNNN`: Zero-padded sequential number (0001, 0002, etc.)
|
|
131
|
+
- `brief-title`: Lowercase, hyphen-separated, descriptive
|
|
132
|
+
- Maximum 50 characters for filename
|
|
133
|
+
|
|
134
|
+
**Examples:**
|
|
135
|
+
- `adr/0001-use-postgresql-database.md`
|
|
136
|
+
- `adr/0015-migrate-to-microservices.md`
|
|
137
|
+
- `adr/0042-implement-api-versioning.md`
|
|
138
|
+
|
|
139
|
+
#### File Location
|
|
140
|
+
|
|
141
|
+
ADRs are stored in the `adr/` directory at the repository root:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
repository-root/
|
|
145
|
+
├── adr/
|
|
146
|
+
│ ├── 0001-use-postgresql-database.md
|
|
147
|
+
│ ├── 0002-implement-jwt-authentication.md
|
|
148
|
+
│ └── 0003-adopt-microservices-architecture.md
|
|
149
|
+
├── openspec/
|
|
150
|
+
├── .beads/
|
|
151
|
+
└── .augment/
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Step 7: Populate Template
|
|
155
|
+
|
|
156
|
+
Fill in the selected template with gathered information:
|
|
157
|
+
|
|
158
|
+
**Example (Nygard Template):**
|
|
159
|
+
```markdown
|
|
160
|
+
---
|
|
161
|
+
id: adr-0001
|
|
162
|
+
title: "Use PostgreSQL for Primary Database"
|
|
163
|
+
status: proposed
|
|
164
|
+
date: 2026-02-05
|
|
165
|
+
deciders: ["kyle@mytech.today"]
|
|
166
|
+
tags: ["database", "infrastructure"]
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
# Use PostgreSQL for Primary Database
|
|
170
|
+
|
|
171
|
+
## Status
|
|
172
|
+
|
|
173
|
+
Proposed
|
|
174
|
+
|
|
175
|
+
## Context
|
|
176
|
+
|
|
177
|
+
We need to select a primary database for our application. Requirements:
|
|
178
|
+
- ACID compliance for financial transactions
|
|
179
|
+
- JSON support for flexible data structures
|
|
180
|
+
- Strong community and ecosystem
|
|
181
|
+
- Proven scalability
|
|
182
|
+
|
|
183
|
+
Current situation: Using SQLite for development, need production database.
|
|
184
|
+
|
|
185
|
+
## Decision
|
|
186
|
+
|
|
187
|
+
We will use PostgreSQL as our primary database.
|
|
188
|
+
|
|
189
|
+
## Consequences
|
|
190
|
+
|
|
191
|
+
### Positive
|
|
192
|
+
- ACID compliance ensures data integrity
|
|
193
|
+
- JSONB support provides flexibility
|
|
194
|
+
- Excellent performance for our scale
|
|
195
|
+
- Strong TypeScript integration via Prisma
|
|
196
|
+
|
|
197
|
+
### Negative
|
|
198
|
+
- Requires PostgreSQL hosting (cost)
|
|
199
|
+
- Team needs to learn PostgreSQL-specific features
|
|
200
|
+
- More complex than SQLite for local development
|
|
201
|
+
|
|
202
|
+
### Neutral
|
|
203
|
+
- Need to set up connection pooling
|
|
204
|
+
- Requires migration from SQLite
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Automation Guidelines
|
|
208
|
+
|
|
209
|
+
### AI Agent Responsibilities
|
|
210
|
+
|
|
211
|
+
When creating ADRs, AI agents should:
|
|
212
|
+
|
|
213
|
+
1. **Auto-generate ID**
|
|
214
|
+
- Find highest existing ADR number
|
|
215
|
+
- Increment by 1
|
|
216
|
+
- Zero-pad to 4 digits
|
|
217
|
+
|
|
218
|
+
2. **Auto-populate Metadata**
|
|
219
|
+
- Set creation date to current date
|
|
220
|
+
- Extract deciders from conversation/commits
|
|
221
|
+
- Generate tags from decision context
|
|
222
|
+
- Link related specs/tasks automatically
|
|
223
|
+
|
|
224
|
+
3. **Extract Context Automatically**
|
|
225
|
+
- Parse code changes for technical context
|
|
226
|
+
- Extract problem statement from conversation
|
|
227
|
+
- Identify alternatives from discussion
|
|
228
|
+
- Capture evaluation criteria
|
|
229
|
+
|
|
230
|
+
4. **Suggest Template**
|
|
231
|
+
- Analyze decision complexity
|
|
232
|
+
- Recommend appropriate template
|
|
233
|
+
- Allow user override
|
|
234
|
+
|
|
235
|
+
5. **Validate Completeness**
|
|
236
|
+
- Check required fields present
|
|
237
|
+
- Verify context is clear
|
|
238
|
+
- Ensure decision is stated
|
|
239
|
+
- Validate consequences documented
|
|
240
|
+
|
|
241
|
+
### User Interaction
|
|
242
|
+
|
|
243
|
+
Provide clear prompts and options:
|
|
244
|
+
|
|
245
|
+
**Creation Prompt:**
|
|
246
|
+
```
|
|
247
|
+
I'll create an ADR for this decision. Let me gather some information:
|
|
248
|
+
|
|
249
|
+
1. Title: "Use PostgreSQL for Primary Database"
|
|
250
|
+
[Edit] [Accept]
|
|
251
|
+
|
|
252
|
+
2. Template: MADR Simple (recommended for this decision)
|
|
253
|
+
[Change] [Accept]
|
|
254
|
+
|
|
255
|
+
3. Context detected:
|
|
256
|
+
- Problem: Need production database
|
|
257
|
+
- Alternatives: PostgreSQL, MySQL, MongoDB
|
|
258
|
+
- Criteria: ACID, JSON support, scalability
|
|
259
|
+
[Edit] [Accept]
|
|
260
|
+
|
|
261
|
+
4. Related items:
|
|
262
|
+
- Spec: openspec/specs/database/schema.md
|
|
263
|
+
- Tasks: bd-db01, bd-db02
|
|
264
|
+
[Edit] [Accept]
|
|
265
|
+
|
|
266
|
+
[Create ADR] [Cancel]
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Integration with Workflows
|
|
270
|
+
|
|
271
|
+
### OpenSpec Integration
|
|
272
|
+
|
|
273
|
+
When creating ADR from OpenSpec change:
|
|
274
|
+
|
|
275
|
+
1. Extract context from proposal.md
|
|
276
|
+
2. Link to spec files in change
|
|
277
|
+
3. Reference in coordination manifest
|
|
278
|
+
4. Update proposal with ADR link
|
|
279
|
+
|
|
280
|
+
**Example:**
|
|
281
|
+
```json
|
|
282
|
+
// .augment/coordination.json
|
|
283
|
+
{
|
|
284
|
+
"adrs": {
|
|
285
|
+
"adr-0001": {
|
|
286
|
+
"file": "adr/0001-use-postgresql-database.md",
|
|
287
|
+
"status": "proposed",
|
|
288
|
+
"relatedSpecs": ["database/schema"],
|
|
289
|
+
"relatedTasks": ["bd-db01", "bd-db02"]
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Beads Integration
|
|
296
|
+
|
|
297
|
+
When creating ADR from Beads task:
|
|
298
|
+
|
|
299
|
+
1. Extract context from task description
|
|
300
|
+
2. Link to related tasks
|
|
301
|
+
3. Add ADR reference to task comments
|
|
302
|
+
4. Update coordination manifest
|
|
303
|
+
|
|
304
|
+
**Example:**
|
|
305
|
+
```bash
|
|
306
|
+
# Add comment to task
|
|
307
|
+
bd comment bd-db01 "Documented in ADR-0001: Use PostgreSQL for Primary Database (adr/0001-use-postgresql-database.md)"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Validation Rules
|
|
311
|
+
|
|
312
|
+
Before creating ADR file, validate:
|
|
313
|
+
|
|
314
|
+
### Required Validations
|
|
315
|
+
- [ ] Unique ID (no duplicates)
|
|
316
|
+
- [ ] Valid status value
|
|
317
|
+
- [ ] Title is descriptive (not generic)
|
|
318
|
+
- [ ] Date is valid ISO 8601
|
|
319
|
+
- [ ] At least one decider listed
|
|
320
|
+
|
|
321
|
+
### Content Validations
|
|
322
|
+
- [ ] Context section explains "why"
|
|
323
|
+
- [ ] Decision section states "what"
|
|
324
|
+
- [ ] Consequences section covers positive/negative
|
|
325
|
+
- [ ] No placeholder text (e.g., "TODO", "TBD")
|
|
326
|
+
|
|
327
|
+
### Reference Validations
|
|
328
|
+
- [ ] Related specs exist
|
|
329
|
+
- [ ] Related tasks exist
|
|
330
|
+
- [ ] Superseded ADRs exist and are valid
|
|
331
|
+
|
|
332
|
+
## Best Practices
|
|
333
|
+
|
|
334
|
+
1. **Create Early**
|
|
335
|
+
- Document decisions when made, not later
|
|
336
|
+
- Capture context while fresh
|
|
337
|
+
- Don't wait for "perfect" documentation
|
|
338
|
+
|
|
339
|
+
2. **Be Concise**
|
|
340
|
+
- Focus on "why" not "how"
|
|
341
|
+
- Avoid implementation details
|
|
342
|
+
- Keep it readable (< 500 words for simple decisions)
|
|
343
|
+
|
|
344
|
+
3. **Link Generously**
|
|
345
|
+
- Connect to related ADRs
|
|
346
|
+
- Link to specs and tasks
|
|
347
|
+
- Reference external resources
|
|
348
|
+
|
|
349
|
+
4. **Update Status**
|
|
350
|
+
- Keep status current
|
|
351
|
+
- Document when implemented
|
|
352
|
+
- Mark as superseded when replaced
|
|
353
|
+
|
|
354
|
+
5. **Review Regularly**
|
|
355
|
+
- Revisit ADRs during retrospectives
|
|
356
|
+
- Update consequences with actual outcomes
|
|
357
|
+
- Archive obsolete decisions
|
|
358
|
+
|
|
359
|
+
## Examples
|
|
360
|
+
|
|
361
|
+
See [examples/](../examples/) directory for complete examples:
|
|
362
|
+
- [Simple Decision Example](../examples/simple-decision-example.md)
|
|
363
|
+
- [Complete Lifecycle Example](../examples/complete-lifecycle-example.md)
|
|
364
|
+
- [Integration Example](../examples/integration-example.md)
|
|
365
|
+
|
|
366
|
+
## See Also
|
|
367
|
+
|
|
368
|
+
- [Decision Detection Rules](./decision-detection.md)
|
|
369
|
+
- [Template Selection Rules](./template-selection.md)
|
|
370
|
+
- [Lifecycle Management](./lifecycle-management.md)
|
|
371
|
+
- [Validation Rules](./validation-rules.md)
|
|
372
|
+
|