@mytechtoday/augment-extensions 1.3.0 → 1.3.1

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 (95) hide show
  1. package/LICENSE +22 -22
  2. package/augment-extensions/domain-rules/software-architecture/README.md +143 -143
  3. package/augment-extensions/domain-rules/software-architecture/examples/banking-layered.md +961 -961
  4. package/augment-extensions/domain-rules/software-architecture/examples/ecommerce-microservices.md +990 -990
  5. package/augment-extensions/domain-rules/software-architecture/examples/iot-eventdriven.md +882 -882
  6. package/augment-extensions/domain-rules/software-architecture/examples/monolith-to-microservices-migration.md +703 -703
  7. package/augment-extensions/domain-rules/software-architecture/examples/serverless-imageprocessing.md +957 -957
  8. package/augment-extensions/domain-rules/software-architecture/examples/trading-eventdriven.md +747 -747
  9. package/augment-extensions/domain-rules/software-architecture/module.json +119 -119
  10. package/augment-extensions/domain-rules/software-architecture/rules/challenges-solutions.md +763 -763
  11. package/augment-extensions/domain-rules/software-architecture/rules/definitions-terminology.md +409 -409
  12. package/augment-extensions/domain-rules/software-architecture/rules/design-principles.md +684 -684
  13. package/augment-extensions/domain-rules/software-architecture/rules/evaluation-testing.md +1381 -1381
  14. package/augment-extensions/domain-rules/software-architecture/rules/event-driven-architecture.md +616 -616
  15. package/augment-extensions/domain-rules/software-architecture/rules/fundamentals.md +306 -306
  16. package/augment-extensions/domain-rules/software-architecture/rules/industry-architectures.md +554 -554
  17. package/augment-extensions/domain-rules/software-architecture/rules/layered-architecture.md +776 -776
  18. package/augment-extensions/domain-rules/software-architecture/rules/microservices-architecture.md +503 -503
  19. package/augment-extensions/domain-rules/software-architecture/rules/modeling-documentation.md +1199 -1199
  20. package/augment-extensions/domain-rules/software-architecture/rules/monolithic-architecture.md +351 -351
  21. package/augment-extensions/domain-rules/software-architecture/rules/principles.md +556 -556
  22. package/augment-extensions/domain-rules/software-architecture/rules/quality-attributes.md +797 -797
  23. package/augment-extensions/domain-rules/software-architecture/rules/scalability-performance.md +1345 -1345
  24. package/augment-extensions/domain-rules/software-architecture/rules/security-architecture.md +1039 -1039
  25. package/augment-extensions/domain-rules/software-architecture/rules/serverless-architecture.md +711 -711
  26. package/augment-extensions/domain-rules/software-architecture/rules/skills-development.md +568 -568
  27. package/augment-extensions/domain-rules/software-architecture/rules/tools-methodologies.md +961 -961
  28. package/augment-extensions/visual-design/CHANGELOG.md +132 -132
  29. package/augment-extensions/visual-design/README.md +255 -255
  30. package/augment-extensions/visual-design/__tests__/README.md +119 -119
  31. package/augment-extensions/visual-design/__tests__/style-selector.test.ts +172 -172
  32. package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +214 -214
  33. package/augment-extensions/visual-design/domains/other/ai-prompt-helper.ts +157 -157
  34. package/augment-extensions/visual-design/domains/other/dotnet-application.ts +156 -156
  35. package/augment-extensions/visual-design/domains/other/linux-platform.ts +156 -156
  36. package/augment-extensions/visual-design/domains/other/mobile-application.ts +157 -157
  37. package/augment-extensions/visual-design/domains/other/motion-picture.ts +156 -156
  38. package/augment-extensions/visual-design/domains/other/os-application.ts +156 -156
  39. package/augment-extensions/visual-design/domains/other/print-campaigns.ts +158 -158
  40. package/augment-extensions/visual-design/domains/other/web-app.ts +157 -157
  41. package/augment-extensions/visual-design/domains/other/website.ts +161 -161
  42. package/augment-extensions/visual-design/domains/other/windows-platform.ts +156 -156
  43. package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +506 -506
  44. package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +615 -615
  45. package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +531 -531
  46. package/augment-extensions/visual-design/examples/README.md +97 -97
  47. package/augment-extensions/visual-design/examples/ai-prompt-generation.md +233 -233
  48. package/augment-extensions/visual-design/examples/basic-usage.md +216 -216
  49. package/augment-extensions/visual-design/examples/domain-workflows.md +257 -257
  50. package/augment-extensions/visual-design/examples/vendor-comparison.md +247 -247
  51. package/augment-extensions/visual-design/module.json +78 -78
  52. package/augment-extensions/visual-design/style-selector.ts +177 -177
  53. package/augment-extensions/visual-design/types.ts +302 -302
  54. package/augment-extensions/visual-design/visual-design-core.ts +469 -469
  55. package/augment-extensions/workflows/adr-support/README.md +227 -227
  56. package/augment-extensions/workflows/adr-support/__tests__/adr-validator.test.ts +203 -203
  57. package/augment-extensions/workflows/adr-support/adr-validator.ts +162 -162
  58. package/augment-extensions/workflows/adr-support/examples/complete-lifecycle-example.md +449 -449
  59. package/augment-extensions/workflows/adr-support/examples/integration-example.md +580 -580
  60. package/augment-extensions/workflows/adr-support/examples/superseding-example.md +436 -436
  61. package/augment-extensions/workflows/adr-support/module.json +112 -112
  62. package/augment-extensions/workflows/adr-support/rules/adr-creation.md +372 -372
  63. package/augment-extensions/workflows/adr-support/rules/beads-integration.md +443 -443
  64. package/augment-extensions/workflows/adr-support/rules/conflict-detection.md +486 -486
  65. package/augment-extensions/workflows/adr-support/rules/decision-detection.md +362 -362
  66. package/augment-extensions/workflows/adr-support/rules/lifecycle-management.md +427 -427
  67. package/augment-extensions/workflows/adr-support/rules/openspec-integration.md +465 -465
  68. package/augment-extensions/workflows/adr-support/rules/template-selection.md +405 -405
  69. package/augment-extensions/workflows/adr-support/rules/validation-rules.md +543 -543
  70. package/augment-extensions/workflows/adr-support/schemas/adr-config.json +191 -191
  71. package/augment-extensions/workflows/adr-support/schemas/adr-metadata.json +172 -172
  72. package/augment-extensions/workflows/adr-support/templates/business-case.md +235 -235
  73. package/augment-extensions/workflows/adr-support/templates/madr-elaborate.md +197 -197
  74. package/augment-extensions/workflows/adr-support/templates/madr-simple.md +68 -68
  75. package/augment-extensions/workflows/adr-support/templates/nygard.md +84 -84
  76. package/augment-extensions/writing-standards/screenplay/rules/file-organization.md +213 -213
  77. package/augment-extensions/writing-standards/screenplay/utils/__tests__/file-organization.test.ts +169 -169
  78. package/augment-extensions/writing-standards/screenplay/utils/file-organization.ts +165 -165
  79. package/cli/dist/utils/auto-sync.js +19 -19
  80. package/package.json +5 -3
  81. package/augment-extensions/workflows/openspec/README.md +0 -96
  82. package/augment-extensions/workflows/openspec/examples/complete-change-example.md +0 -244
  83. package/augment-extensions/workflows/openspec/module.json +0 -54
  84. package/augment-extensions/workflows/openspec/rules/best-practices.md +0 -272
  85. package/augment-extensions/workflows/openspec/rules/manual-setup.md +0 -231
  86. package/augment-extensions/workflows/openspec/rules/spec-format.md +0 -236
  87. package/augment-extensions/workflows/openspec/rules/workflow.md +0 -214
  88. package/cli/dist/utils/__tests__/adr-validator.example.d.ts +0 -6
  89. package/cli/dist/utils/__tests__/adr-validator.example.d.ts.map +0 -1
  90. package/cli/dist/utils/__tests__/adr-validator.example.js +0 -148
  91. package/cli/dist/utils/__tests__/adr-validator.example.js.map +0 -1
  92. package/cli/dist/utils/adr-validator.d.ts +0 -65
  93. package/cli/dist/utils/adr-validator.d.ts.map +0 -1
  94. package/cli/dist/utils/adr-validator.js +0 -203
  95. package/cli/dist/utils/adr-validator.js.map +0 -1
@@ -1,203 +1,203 @@
1
- /**
2
- * Tests for ADR Validation Module
3
- */
4
-
5
- import { describe, it, expect } from '@jest/globals';
6
- import {
7
- ADR,
8
- isValidISO8601,
9
- validateMetadata,
10
- validateOptionalFields,
11
- validateADRReferences
12
- } from '../adr-validator';
13
-
14
- describe('ADR Validator', () => {
15
- describe('isValidISO8601', () => {
16
- it('should accept valid ISO 8601 dates', () => {
17
- expect(isValidISO8601('2026-02-06')).toBe(true);
18
- expect(isValidISO8601('2024-01-01')).toBe(true);
19
- expect(isValidISO8601('2024-12-31')).toBe(true);
20
- });
21
-
22
- it('should reject invalid dates', () => {
23
- expect(isValidISO8601('2024-02-30')).toBe(false); // Invalid day
24
- expect(isValidISO8601('2024-13-01')).toBe(false); // Invalid month
25
- expect(isValidISO8601('2024-00-01')).toBe(false); // Invalid month
26
- expect(isValidISO8601('2024-01-32')).toBe(false); // Invalid day
27
- expect(isValidISO8601('24-01-01')).toBe(false); // Wrong format
28
- expect(isValidISO8601('2024/01/01')).toBe(false); // Wrong separator
29
- expect(isValidISO8601('2024-1-1')).toBe(false); // Missing leading zeros
30
- expect(isValidISO8601('not-a-date')).toBe(false);
31
- expect(isValidISO8601('')).toBe(false);
32
- });
33
- });
34
-
35
- describe('validateMetadata', () => {
36
- it('should accept valid ADR metadata', () => {
37
- const validADR: ADR = {
38
- id: 'adr-0001',
39
- title: 'Use PostgreSQL for Primary Database',
40
- status: 'approved',
41
- date: '2026-02-06',
42
- deciders: ['Tech Lead', 'Database Architect']
43
- };
44
-
45
- const result = validateMetadata(validADR);
46
- expect(result.valid).toBe(true);
47
- expect(result.errors).toEqual([]);
48
- });
49
-
50
- it('should reject missing required fields', () => {
51
- const invalidADR = {
52
- id: 'adr-0001',
53
- title: 'Test',
54
- status: 'approved'
55
- } as ADR;
56
-
57
- const result = validateMetadata(invalidADR);
58
- expect(result.valid).toBe(false);
59
- expect(result.errors).toContain('Missing required field: date');
60
- expect(result.errors).toContain('At least one decider must be specified');
61
- });
62
-
63
- it('should reject invalid ID format', () => {
64
- const invalidADR: ADR = {
65
- id: 'adr-1', // Should be adr-0001
66
- title: 'Valid Title Here',
67
- status: 'approved',
68
- date: '2026-02-06',
69
- deciders: ['Tech Lead']
70
- };
71
-
72
- const result = validateMetadata(invalidADR);
73
- expect(result.valid).toBe(false);
74
- expect(result.errors).toContain('Invalid ID format. Must be adr-NNNN (e.g., adr-0001)');
75
- });
76
-
77
- it('should reject invalid title length', () => {
78
- const shortTitle: ADR = {
79
- id: 'adr-0001',
80
- title: 'Short', // Less than 10 characters
81
- status: 'approved',
82
- date: '2026-02-06',
83
- deciders: ['Tech Lead']
84
- };
85
-
86
- const result = validateMetadata(shortTitle);
87
- expect(result.valid).toBe(false);
88
- expect(result.errors).toContain('Title must be 10-100 characters');
89
- });
90
-
91
- it('should reject invalid status', () => {
92
- const invalidStatus: ADR = {
93
- id: 'adr-0001',
94
- title: 'Valid Title Here',
95
- status: 'invalid-status',
96
- date: '2026-02-06',
97
- deciders: ['Tech Lead']
98
- };
99
-
100
- const result = validateMetadata(invalidStatus);
101
- expect(result.valid).toBe(false);
102
- expect(result.errors?.some(e => e.includes('Invalid status'))).toBe(true);
103
- });
104
-
105
- it('should reject invalid date format', () => {
106
- const invalidDate: ADR = {
107
- id: 'adr-0001',
108
- title: 'Valid Title Here',
109
- status: 'approved',
110
- date: '2024-02-30', // Invalid date
111
- deciders: ['Tech Lead']
112
- };
113
-
114
- const result = validateMetadata(invalidDate);
115
- expect(result.valid).toBe(false);
116
- expect(result.errors).toContain('Invalid date format. Must be ISO 8601 (YYYY-MM-DD)');
117
- });
118
- });
119
-
120
- describe('validateOptionalFields', () => {
121
- it('should accept valid optional fields', () => {
122
- const adr: ADR = {
123
- id: 'adr-0001',
124
- title: 'Valid Title Here',
125
- status: 'approved',
126
- date: '2026-02-06',
127
- deciders: ['Tech Lead'],
128
- tags: ['database', 'postgresql'],
129
- supersedes: ['adr-0002'],
130
- superseded_by: 'adr-0003'
131
- };
132
-
133
- const result = validateOptionalFields(adr);
134
- expect(result.valid).toBe(true);
135
- expect(result.warnings).toEqual([]);
136
- });
137
-
138
- it('should warn about invalid supersedes format', () => {
139
- const adr: ADR = {
140
- id: 'adr-0001',
141
- title: 'Valid Title Here',
142
- status: 'approved',
143
- date: '2026-02-06',
144
- deciders: ['Tech Lead'],
145
- supersedes: ['adr-1', 'invalid-id'] // Invalid formats
146
- };
147
-
148
- const result = validateOptionalFields(adr);
149
- expect(result.valid).toBe(false);
150
- expect(result.warnings?.some(w => w.includes('Invalid ADR ID in supersedes'))).toBe(true);
151
- });
152
- });
153
-
154
- describe('validateADRReferences', () => {
155
- const existingADRs: ADR[] = [
156
- {
157
- id: 'adr-0001',
158
- title: 'First Decision',
159
- status: 'approved',
160
- date: '2026-01-01',
161
- deciders: ['Tech Lead']
162
- },
163
- {
164
- id: 'adr-0002',
165
- title: 'Second Decision',
166
- status: 'approved',
167
- date: '2026-01-02',
168
- deciders: ['Tech Lead']
169
- }
170
- ];
171
-
172
- it('should warn when related_decisions references non-existent ADR', () => {
173
- const adr: ADR = {
174
- id: 'adr-0003',
175
- title: 'Third Decision',
176
- status: 'approved',
177
- date: '2026-01-03',
178
- deciders: ['Tech Lead'],
179
- related_decisions: ['adr-0001', 'adr-9999'] // adr-9999 doesn't exist
180
- };
181
-
182
- const result = validateADRReferences(adr, existingADRs);
183
- expect(result.valid).toBe(false);
184
- expect(result.warnings).toContain('Related ADR does not exist: adr-9999');
185
- });
186
-
187
- it('should pass when all references exist', () => {
188
- const adr: ADR = {
189
- id: 'adr-0003',
190
- title: 'Third Decision',
191
- status: 'approved',
192
- date: '2026-01-03',
193
- deciders: ['Tech Lead'],
194
- related_decisions: ['adr-0001', 'adr-0002']
195
- };
196
-
197
- const result = validateADRReferences(adr, existingADRs);
198
- expect(result.valid).toBe(true);
199
- expect(result.warnings).toEqual([]);
200
- });
201
- });
202
- });
203
-
1
+ /**
2
+ * Tests for ADR Validation Module
3
+ */
4
+
5
+ import { describe, it, expect } from '@jest/globals';
6
+ import {
7
+ ADR,
8
+ isValidISO8601,
9
+ validateMetadata,
10
+ validateOptionalFields,
11
+ validateADRReferences
12
+ } from '../adr-validator';
13
+
14
+ describe('ADR Validator', () => {
15
+ describe('isValidISO8601', () => {
16
+ it('should accept valid ISO 8601 dates', () => {
17
+ expect(isValidISO8601('2026-02-06')).toBe(true);
18
+ expect(isValidISO8601('2024-01-01')).toBe(true);
19
+ expect(isValidISO8601('2024-12-31')).toBe(true);
20
+ });
21
+
22
+ it('should reject invalid dates', () => {
23
+ expect(isValidISO8601('2024-02-30')).toBe(false); // Invalid day
24
+ expect(isValidISO8601('2024-13-01')).toBe(false); // Invalid month
25
+ expect(isValidISO8601('2024-00-01')).toBe(false); // Invalid month
26
+ expect(isValidISO8601('2024-01-32')).toBe(false); // Invalid day
27
+ expect(isValidISO8601('24-01-01')).toBe(false); // Wrong format
28
+ expect(isValidISO8601('2024/01/01')).toBe(false); // Wrong separator
29
+ expect(isValidISO8601('2024-1-1')).toBe(false); // Missing leading zeros
30
+ expect(isValidISO8601('not-a-date')).toBe(false);
31
+ expect(isValidISO8601('')).toBe(false);
32
+ });
33
+ });
34
+
35
+ describe('validateMetadata', () => {
36
+ it('should accept valid ADR metadata', () => {
37
+ const validADR: ADR = {
38
+ id: 'adr-0001',
39
+ title: 'Use PostgreSQL for Primary Database',
40
+ status: 'approved',
41
+ date: '2026-02-06',
42
+ deciders: ['Tech Lead', 'Database Architect']
43
+ };
44
+
45
+ const result = validateMetadata(validADR);
46
+ expect(result.valid).toBe(true);
47
+ expect(result.errors).toEqual([]);
48
+ });
49
+
50
+ it('should reject missing required fields', () => {
51
+ const invalidADR = {
52
+ id: 'adr-0001',
53
+ title: 'Test',
54
+ status: 'approved'
55
+ } as ADR;
56
+
57
+ const result = validateMetadata(invalidADR);
58
+ expect(result.valid).toBe(false);
59
+ expect(result.errors).toContain('Missing required field: date');
60
+ expect(result.errors).toContain('At least one decider must be specified');
61
+ });
62
+
63
+ it('should reject invalid ID format', () => {
64
+ const invalidADR: ADR = {
65
+ id: 'adr-1', // Should be adr-0001
66
+ title: 'Valid Title Here',
67
+ status: 'approved',
68
+ date: '2026-02-06',
69
+ deciders: ['Tech Lead']
70
+ };
71
+
72
+ const result = validateMetadata(invalidADR);
73
+ expect(result.valid).toBe(false);
74
+ expect(result.errors).toContain('Invalid ID format. Must be adr-NNNN (e.g., adr-0001)');
75
+ });
76
+
77
+ it('should reject invalid title length', () => {
78
+ const shortTitle: ADR = {
79
+ id: 'adr-0001',
80
+ title: 'Short', // Less than 10 characters
81
+ status: 'approved',
82
+ date: '2026-02-06',
83
+ deciders: ['Tech Lead']
84
+ };
85
+
86
+ const result = validateMetadata(shortTitle);
87
+ expect(result.valid).toBe(false);
88
+ expect(result.errors).toContain('Title must be 10-100 characters');
89
+ });
90
+
91
+ it('should reject invalid status', () => {
92
+ const invalidStatus: ADR = {
93
+ id: 'adr-0001',
94
+ title: 'Valid Title Here',
95
+ status: 'invalid-status',
96
+ date: '2026-02-06',
97
+ deciders: ['Tech Lead']
98
+ };
99
+
100
+ const result = validateMetadata(invalidStatus);
101
+ expect(result.valid).toBe(false);
102
+ expect(result.errors?.some(e => e.includes('Invalid status'))).toBe(true);
103
+ });
104
+
105
+ it('should reject invalid date format', () => {
106
+ const invalidDate: ADR = {
107
+ id: 'adr-0001',
108
+ title: 'Valid Title Here',
109
+ status: 'approved',
110
+ date: '2024-02-30', // Invalid date
111
+ deciders: ['Tech Lead']
112
+ };
113
+
114
+ const result = validateMetadata(invalidDate);
115
+ expect(result.valid).toBe(false);
116
+ expect(result.errors).toContain('Invalid date format. Must be ISO 8601 (YYYY-MM-DD)');
117
+ });
118
+ });
119
+
120
+ describe('validateOptionalFields', () => {
121
+ it('should accept valid optional fields', () => {
122
+ const adr: ADR = {
123
+ id: 'adr-0001',
124
+ title: 'Valid Title Here',
125
+ status: 'approved',
126
+ date: '2026-02-06',
127
+ deciders: ['Tech Lead'],
128
+ tags: ['database', 'postgresql'],
129
+ supersedes: ['adr-0002'],
130
+ superseded_by: 'adr-0003'
131
+ };
132
+
133
+ const result = validateOptionalFields(adr);
134
+ expect(result.valid).toBe(true);
135
+ expect(result.warnings).toEqual([]);
136
+ });
137
+
138
+ it('should warn about invalid supersedes format', () => {
139
+ const adr: ADR = {
140
+ id: 'adr-0001',
141
+ title: 'Valid Title Here',
142
+ status: 'approved',
143
+ date: '2026-02-06',
144
+ deciders: ['Tech Lead'],
145
+ supersedes: ['adr-1', 'invalid-id'] // Invalid formats
146
+ };
147
+
148
+ const result = validateOptionalFields(adr);
149
+ expect(result.valid).toBe(false);
150
+ expect(result.warnings?.some(w => w.includes('Invalid ADR ID in supersedes'))).toBe(true);
151
+ });
152
+ });
153
+
154
+ describe('validateADRReferences', () => {
155
+ const existingADRs: ADR[] = [
156
+ {
157
+ id: 'adr-0001',
158
+ title: 'First Decision',
159
+ status: 'approved',
160
+ date: '2026-01-01',
161
+ deciders: ['Tech Lead']
162
+ },
163
+ {
164
+ id: 'adr-0002',
165
+ title: 'Second Decision',
166
+ status: 'approved',
167
+ date: '2026-01-02',
168
+ deciders: ['Tech Lead']
169
+ }
170
+ ];
171
+
172
+ it('should warn when related_decisions references non-existent ADR', () => {
173
+ const adr: ADR = {
174
+ id: 'adr-0003',
175
+ title: 'Third Decision',
176
+ status: 'approved',
177
+ date: '2026-01-03',
178
+ deciders: ['Tech Lead'],
179
+ related_decisions: ['adr-0001', 'adr-9999'] // adr-9999 doesn't exist
180
+ };
181
+
182
+ const result = validateADRReferences(adr, existingADRs);
183
+ expect(result.valid).toBe(false);
184
+ expect(result.warnings).toContain('Related ADR does not exist: adr-9999');
185
+ });
186
+
187
+ it('should pass when all references exist', () => {
188
+ const adr: ADR = {
189
+ id: 'adr-0003',
190
+ title: 'Third Decision',
191
+ status: 'approved',
192
+ date: '2026-01-03',
193
+ deciders: ['Tech Lead'],
194
+ related_decisions: ['adr-0001', 'adr-0002']
195
+ };
196
+
197
+ const result = validateADRReferences(adr, existingADRs);
198
+ expect(result.valid).toBe(true);
199
+ expect(result.warnings).toEqual([]);
200
+ });
201
+ });
202
+ });
203
+