@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.
Files changed (57) hide show
  1. package/augment-extensions/visual-design/CHANGELOG.md +132 -0
  2. package/augment-extensions/visual-design/README.md +255 -0
  3. package/augment-extensions/visual-design/__tests__/README.md +119 -0
  4. package/augment-extensions/visual-design/__tests__/style-selector.test.ts +172 -0
  5. package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +214 -0
  6. package/augment-extensions/visual-design/domains/other/ai-prompt-helper.ts +157 -0
  7. package/augment-extensions/visual-design/domains/other/dotnet-application.ts +156 -0
  8. package/augment-extensions/visual-design/domains/other/linux-platform.ts +156 -0
  9. package/augment-extensions/visual-design/domains/other/mobile-application.ts +157 -0
  10. package/augment-extensions/visual-design/domains/other/motion-picture.ts +156 -0
  11. package/augment-extensions/visual-design/domains/other/os-application.ts +156 -0
  12. package/augment-extensions/visual-design/domains/other/print-campaigns.ts +158 -0
  13. package/augment-extensions/visual-design/domains/other/web-app.ts +157 -0
  14. package/augment-extensions/visual-design/domains/other/website.ts +161 -0
  15. package/augment-extensions/visual-design/domains/other/windows-platform.ts +156 -0
  16. package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +506 -0
  17. package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +615 -0
  18. package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +531 -0
  19. package/augment-extensions/visual-design/examples/README.md +97 -0
  20. package/augment-extensions/visual-design/examples/ai-prompt-generation.md +233 -0
  21. package/augment-extensions/visual-design/examples/basic-usage.md +216 -0
  22. package/augment-extensions/visual-design/examples/domain-workflows.md +257 -0
  23. package/augment-extensions/visual-design/examples/vendor-comparison.md +247 -0
  24. package/augment-extensions/visual-design/module.json +78 -0
  25. package/augment-extensions/visual-design/style-selector.ts +177 -0
  26. package/augment-extensions/visual-design/types.ts +302 -0
  27. package/augment-extensions/visual-design/visual-design-core.ts +469 -0
  28. package/augment-extensions/workflows/adr-support/README.md +227 -0
  29. package/augment-extensions/workflows/adr-support/__tests__/adr-validator.test.ts +203 -0
  30. package/augment-extensions/workflows/adr-support/adr-validator.ts +162 -0
  31. package/augment-extensions/workflows/adr-support/examples/complete-lifecycle-example.md +449 -0
  32. package/augment-extensions/workflows/adr-support/examples/integration-example.md +580 -0
  33. package/augment-extensions/workflows/adr-support/examples/superseding-example.md +436 -0
  34. package/augment-extensions/workflows/adr-support/module.json +112 -0
  35. package/augment-extensions/workflows/adr-support/rules/adr-creation.md +372 -0
  36. package/augment-extensions/workflows/adr-support/rules/beads-integration.md +443 -0
  37. package/augment-extensions/workflows/adr-support/rules/conflict-detection.md +486 -0
  38. package/augment-extensions/workflows/adr-support/rules/decision-detection.md +362 -0
  39. package/augment-extensions/workflows/adr-support/rules/lifecycle-management.md +427 -0
  40. package/augment-extensions/workflows/adr-support/rules/openspec-integration.md +465 -0
  41. package/augment-extensions/workflows/adr-support/rules/template-selection.md +405 -0
  42. package/augment-extensions/workflows/adr-support/rules/validation-rules.md +543 -0
  43. package/augment-extensions/workflows/adr-support/schemas/adr-config.json +191 -0
  44. package/augment-extensions/workflows/adr-support/schemas/adr-metadata.json +172 -0
  45. package/augment-extensions/workflows/adr-support/templates/business-case.md +235 -0
  46. package/augment-extensions/workflows/adr-support/templates/madr-elaborate.md +197 -0
  47. package/augment-extensions/workflows/adr-support/templates/madr-simple.md +68 -0
  48. package/augment-extensions/workflows/adr-support/templates/nygard.md +84 -0
  49. package/cli/dist/utils/__tests__/adr-validator.example.d.ts +6 -0
  50. package/cli/dist/utils/__tests__/adr-validator.example.d.ts.map +1 -0
  51. package/cli/dist/utils/__tests__/adr-validator.example.js +148 -0
  52. package/cli/dist/utils/__tests__/adr-validator.example.js.map +1 -0
  53. package/cli/dist/utils/adr-validator.d.ts +65 -0
  54. package/cli/dist/utils/adr-validator.d.ts.map +1 -0
  55. package/cli/dist/utils/adr-validator.js +203 -0
  56. package/cli/dist/utils/adr-validator.js.map +1 -0
  57. package/package.json +1 -1
@@ -0,0 +1,465 @@
1
+ # OpenSpec Integration Rules
2
+
3
+ ## Overview
4
+
5
+ This document defines how Architecture Decision Records (ADRs) integrate with OpenSpec workflow, including linking ADRs to specs, cross-referencing, coordination manifest updates, and workflow integration.
6
+
7
+ ## Integration Points
8
+
9
+ ### 1. ADRs from OpenSpec Changes
10
+
11
+ When architectural decisions are made during OpenSpec changes:
12
+
13
+ ```
14
+ OpenSpec Change Proposal
15
+
16
+ Architectural Decision Identified
17
+
18
+ Create ADR
19
+
20
+ Link ADR to Spec
21
+
22
+ Update Coordination Manifest
23
+ ```
24
+
25
+ ### 2. Specs from ADRs
26
+
27
+ When ADRs require specification changes:
28
+
29
+ ```
30
+ ADR Created/Approved
31
+
32
+ Spec Changes Needed
33
+
34
+ Create OpenSpec Change
35
+
36
+ Link Spec to ADR
37
+
38
+ Update Coordination Manifest
39
+ ```
40
+
41
+ ## Linking ADRs to Specs
42
+
43
+ ### In ADR Metadata
44
+
45
+ ```yaml
46
+ ---
47
+ id: adr-0042
48
+ title: "Migrate to Microservices Architecture"
49
+ status: approved
50
+ date: 2026-02-05
51
+ related_specs:
52
+ - "openspec/specs/architecture/microservices.md"
53
+ - "openspec/specs/deployment/kubernetes.md"
54
+ related_changes:
55
+ - "openspec/changes/microservices-migration/"
56
+ ---
57
+ ```
58
+
59
+ ### In OpenSpec Proposal
60
+
61
+ ```markdown
62
+ # Microservices Migration Proposal
63
+
64
+ ## Related ADRs
65
+
66
+ - [ADR-0042: Migrate to Microservices Architecture](../../adr/0042-migrate-to-microservices.md)
67
+ - Status: Approved
68
+ - Decision: Adopt microservices architecture for user and payment services
69
+ - Rationale: See ADR for detailed analysis
70
+
71
+ ## Architectural Decisions
72
+
73
+ This change implements the decisions documented in ADR-0042:
74
+ - Service boundaries defined
75
+ - Communication patterns established
76
+ - Deployment strategy selected
77
+ ```
78
+
79
+ ### In Spec Files
80
+
81
+ ```markdown
82
+ # Microservices Architecture Specification
83
+
84
+ ## Architectural Decisions
85
+
86
+ This specification is based on the following ADRs:
87
+
88
+ - [ADR-0042: Migrate to Microservices](../../adr/0042-migrate-to-microservices.md) - Core architecture decision
89
+ - [ADR-0043: Use gRPC for Service Communication](../../adr/0043-use-grpc-communication.md) - Communication protocol
90
+ - [ADR-0044: Deploy on Kubernetes](../../adr/0044-deploy-on-kubernetes.md) - Deployment platform
91
+
92
+ ## Architecture Overview
93
+
94
+ [Specification content based on ADR decisions...]
95
+ ```
96
+
97
+ ## Coordination Manifest Integration
98
+
99
+ ### Manifest Structure
100
+
101
+ ```json
102
+ {
103
+ "adrs": {
104
+ "adr-0042": {
105
+ "file": "adr/0042-migrate-to-microservices.md",
106
+ "title": "Migrate to Microservices Architecture",
107
+ "status": "approved",
108
+ "relatedSpecs": ["architecture/microservices"],
109
+ "relatedChanges": ["microservices-migration"],
110
+ "relatedTasks": ["bd-ms01", "bd-ms02"]
111
+ }
112
+ },
113
+ "specs": {
114
+ "architecture/microservices": {
115
+ "file": "openspec/specs/architecture/microservices.md",
116
+ "status": "active",
117
+ "relatedADRs": ["adr-0042", "adr-0043", "adr-0044"],
118
+ "relatedTasks": ["bd-ms01", "bd-ms02", "bd-ms03"]
119
+ }
120
+ },
121
+ "changes": {
122
+ "microservices-migration": {
123
+ "directory": "openspec/changes/microservices-migration/",
124
+ "status": "in-progress",
125
+ "relatedADRs": ["adr-0042"],
126
+ "relatedSpecs": ["architecture/microservices"],
127
+ "relatedTasks": ["bd-ms01", "bd-ms02", "bd-ms03"]
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ ### Updating Coordination Manifest
134
+
135
+ **When ADR is created:**
136
+
137
+ ```typescript
138
+ function addADRToCoordination(adr: ADR) {
139
+ const coordination = loadCoordinationManifest();
140
+
141
+ coordination.adrs[adr.id] = {
142
+ file: `adr/${adr.id}-${slugify(adr.title)}.md`,
143
+ title: adr.title,
144
+ status: adr.status,
145
+ relatedSpecs: adr.related_specs?.map(extractSpecId) || [],
146
+ relatedChanges: adr.related_changes?.map(extractChangeId) || [],
147
+ relatedTasks: adr.related_tasks || []
148
+ };
149
+
150
+ // Update related specs
151
+ adr.related_specs?.forEach(specPath => {
152
+ const specId = extractSpecId(specPath);
153
+ if (coordination.specs[specId]) {
154
+ coordination.specs[specId].relatedADRs.push(adr.id);
155
+ }
156
+ });
157
+
158
+ saveCoordinationManifest(coordination);
159
+ }
160
+ ```
161
+
162
+ **When ADR status changes:**
163
+
164
+ ```typescript
165
+ function updateADRStatus(adrId: string, newStatus: string) {
166
+ const coordination = loadCoordinationManifest();
167
+
168
+ if (coordination.adrs[adrId]) {
169
+ coordination.adrs[adrId].status = newStatus;
170
+
171
+ // If implemented, update related specs
172
+ if (newStatus === 'implemented') {
173
+ coordination.adrs[adrId].relatedSpecs.forEach(specId => {
174
+ if (coordination.specs[specId]) {
175
+ // Spec can now be considered "implemented" or "active"
176
+ coordination.specs[specId].status = 'active';
177
+ }
178
+ });
179
+ }
180
+ }
181
+
182
+ saveCoordinationManifest(coordination);
183
+ }
184
+ ```
185
+
186
+ ## Workflow Integration Patterns
187
+
188
+ ### Pattern 1: ADR-First Workflow
189
+
190
+ **Use when:** Architectural decision needs to be made before spec work begins.
191
+
192
+ ```
193
+ 1. Detect architectural decision
194
+ 2. Create ADR (draft)
195
+ 3. Evaluate alternatives
196
+ 4. Approve ADR
197
+ 5. Create OpenSpec change based on ADR
198
+ 6. Implement spec
199
+ 7. Update ADR status to implemented
200
+ ```
201
+
202
+ **Example:**
203
+ ```bash
204
+ # Step 1-4: Create and approve ADR
205
+ # ADR-0042: Migrate to Microservices
206
+
207
+ # Step 5: Create OpenSpec change
208
+ mkdir -p openspec/changes/microservices-migration
209
+ cat > openspec/changes/microservices-migration/proposal.md << EOF
210
+ # Microservices Migration
211
+
212
+ ## Related ADRs
213
+ - ADR-0042: Migrate to Microservices Architecture
214
+
215
+ ## Proposal
216
+ Implement the architecture defined in ADR-0042...
217
+ EOF
218
+
219
+ # Step 6-7: Implement and update
220
+ ```
221
+
222
+ ### Pattern 2: Spec-First Workflow
223
+
224
+ **Use when:** Spec work reveals need for architectural decision.
225
+
226
+ ```
227
+ 1. Create OpenSpec change
228
+ 2. During spec work, identify architectural decision
229
+ 3. Create ADR to document decision
230
+ 4. Link ADR to spec
231
+ 5. Continue spec work
232
+ 6. Approve ADR
233
+ 7. Complete spec implementation
234
+ ```
235
+
236
+ **Example:**
237
+ ```markdown
238
+ <!-- In openspec/changes/add-caching/proposal.md -->
239
+
240
+ # Add Caching Layer
241
+
242
+ ## Architectural Decisions
243
+
244
+ During this work, we identified the need to decide on a caching strategy.
245
+
246
+ Created [ADR-0045: Use Redis for Caching](../../adr/0045-use-redis-caching.md)
247
+
248
+ ## Proposal
249
+
250
+ Based on ADR-0045, we will implement Redis caching...
251
+ ```
252
+
253
+ ### Pattern 3: Parallel Workflow
254
+
255
+ **Use when:** ADR and spec work happen simultaneously.
256
+
257
+ ```
258
+ 1. Identify need for both ADR and spec
259
+ 2. Create ADR (draft) and OpenSpec change (draft)
260
+ 3. Work on both in parallel
261
+ 4. Cross-reference between ADR and spec
262
+ 5. Approve ADR
263
+ 6. Finalize spec based on approved ADR
264
+ 7. Implement
265
+ ```
266
+
267
+ ## Cross-Referencing Best Practices
268
+
269
+ ### 1. Bidirectional Links
270
+
271
+ Always link in both directions:
272
+
273
+ **In ADR:**
274
+ ```yaml
275
+ related_specs:
276
+ - "openspec/specs/architecture/microservices.md"
277
+ ```
278
+
279
+ **In Spec:**
280
+ ```markdown
281
+ ## Related ADRs
282
+ - [ADR-0042: Migrate to Microservices](../../adr/0042-migrate-to-microservices.md)
283
+ ```
284
+
285
+ ### 2. Descriptive Link Text
286
+
287
+ Use descriptive text, not just "see ADR-0042":
288
+
289
+ **Good:**
290
+ ```markdown
291
+ The service boundaries are defined in [ADR-0042: Migrate to Microservices](../../adr/0042-migrate-to-microservices.md), which evaluated domain-driven design principles.
292
+ ```
293
+
294
+ **Bad:**
295
+ ```markdown
296
+ See [ADR-0042](../../adr/0042-migrate-to-microservices.md).
297
+ ```
298
+
299
+ ### 3. Context in Links
300
+
301
+ Provide context for why the link is relevant:
302
+
303
+ ```markdown
304
+ ## Communication Protocol
305
+
306
+ We chose gRPC for inter-service communication based on [ADR-0043: Use gRPC for Service Communication](../../adr/0043-use-grpc-communication.md), which compared gRPC, REST, and message queues for our specific performance and type-safety requirements.
307
+ ```
308
+
309
+ ### 4. Link Status Awareness
310
+
311
+ Indicate if linked ADR is still draft or has been superseded:
312
+
313
+ ```markdown
314
+ ## Deployment Strategy
315
+
316
+ **Note:** This section is based on [ADR-0044: Deploy on Kubernetes](../../adr/0044-deploy-on-kubernetes.md) (Status: Approved, pending implementation).
317
+ ```
318
+
319
+ ## Spec Delta Integration
320
+
321
+ When ADRs affect specs, document in spec deltas:
322
+
323
+ ```markdown
324
+ # Spec Delta: Microservices Architecture
325
+
326
+ ## ADDED
327
+
328
+ ### Architecture Decision Records
329
+
330
+ - [ADR-0042: Migrate to Microservices Architecture](../../adr/0042-migrate-to-microservices.md)
331
+ - Establishes microservices as the target architecture
332
+ - Defines service boundaries
333
+ - Specifies communication patterns
334
+
335
+ ## MODIFIED
336
+
337
+ ### openspec/specs/architecture/overview.md
338
+
339
+ **Before:**
340
+ ```
341
+ Monolithic architecture with layered design.
342
+ ```
343
+
344
+ **After:**
345
+ ```
346
+ Microservices architecture based on ADR-0042.
347
+ Service boundaries defined by domain-driven design principles.
348
+ ```
349
+
350
+ ## REMOVED
351
+
352
+ None
353
+ ```
354
+
355
+ ## Validation and Consistency
356
+
357
+ ### Validate ADR-Spec Links
358
+
359
+ ```typescript
360
+ function validateADRSpecLinks(adr: ADR): ValidationResult {
361
+ const warnings = [];
362
+
363
+ // Check that referenced specs exist
364
+ adr.related_specs?.forEach(specPath => {
365
+ if (!fileExists(specPath)) {
366
+ warnings.push(`Referenced spec does not exist: ${specPath}`);
367
+ } else {
368
+ // Check if spec references this ADR back
369
+ const specContent = readFile(specPath);
370
+ if (!specContent.includes(adr.id)) {
371
+ warnings.push(`Spec ${specPath} does not reference ADR ${adr.id} (one-way link)`);
372
+ }
373
+ }
374
+ });
375
+
376
+ return { valid: warnings.length === 0, warnings };
377
+ }
378
+ ```
379
+
380
+ ### Sync Coordination Manifest
381
+
382
+ ```typescript
383
+ function syncCoordinationManifest() {
384
+ const coordination = loadCoordinationManifest();
385
+ const adrs = loadAllADRs();
386
+ const specs = loadAllSpecs();
387
+
388
+ // Ensure all ADRs are in manifest
389
+ adrs.forEach(adr => {
390
+ if (!coordination.adrs[adr.id]) {
391
+ addADRToCoordination(adr);
392
+ }
393
+ });
394
+
395
+ // Ensure all links are bidirectional
396
+ Object.entries(coordination.adrs).forEach(([adrId, adrEntry]) => {
397
+ adrEntry.relatedSpecs.forEach(specId => {
398
+ if (coordination.specs[specId]) {
399
+ if (!coordination.specs[specId].relatedADRs.includes(adrId)) {
400
+ coordination.specs[specId].relatedADRs.push(adrId);
401
+ }
402
+ }
403
+ });
404
+ });
405
+
406
+ saveCoordinationManifest(coordination);
407
+ }
408
+ ```
409
+
410
+ ## Examples
411
+
412
+ ### Example 1: Database Decision
413
+
414
+ **ADR:**
415
+ ```yaml
416
+ ---
417
+ id: adr-0001
418
+ title: "Use PostgreSQL for Primary Database"
419
+ status: approved
420
+ related_specs:
421
+ - "openspec/specs/database/schema.md"
422
+ - "openspec/specs/database/connection-pooling.md"
423
+ ---
424
+ ```
425
+
426
+ **Spec:**
427
+ ```markdown
428
+ # Database Schema Specification
429
+
430
+ ## Architectural Foundation
431
+
432
+ This specification implements [ADR-0001: Use PostgreSQL for Primary Database](../../adr/0001-use-postgresql-database.md).
433
+
434
+ PostgreSQL-specific features used:
435
+ - JSONB for flexible data
436
+ - Array types for tags
437
+ - Full-text search
438
+ ```
439
+
440
+ **Coordination Manifest:**
441
+ ```json
442
+ {
443
+ "adrs": {
444
+ "adr-0001": {
445
+ "file": "adr/0001-use-postgresql-database.md",
446
+ "status": "approved",
447
+ "relatedSpecs": ["database/schema", "database/connection-pooling"]
448
+ }
449
+ },
450
+ "specs": {
451
+ "database/schema": {
452
+ "file": "openspec/specs/database/schema.md",
453
+ "relatedADRs": ["adr-0001"]
454
+ }
455
+ }
456
+ }
457
+ ```
458
+
459
+ ## See Also
460
+
461
+ - [ADR Creation Guidelines](./adr-creation.md)
462
+ - [Beads Integration](./beads-integration.md)
463
+ - [Lifecycle Management](./lifecycle-management.md)
464
+ - [Coordination System](../../../../.augment-guidelines/system-integration/coordination-system.md)
465
+