@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,197 @@
1
+ # ADR-{number}: {Title}
2
+
3
+ **Status:** {Draft | Proposed | Approved | Implemented | Superseded | Deprecated}
4
+
5
+ **Date:** {YYYY-MM-DD}
6
+
7
+ **Deciders:** {List of people involved in the decision}
8
+
9
+ **Technical Story:** {Optional: Link to related issue, spec, or task}
10
+
11
+ ---
12
+
13
+ ## Context and Problem Statement
14
+
15
+ {Describe the context and problem statement in detail. What is the issue that motivates this decision? What are the business and technical drivers?}
16
+
17
+ ### Background
18
+
19
+ {Provide additional background information that helps understand the problem domain}
20
+
21
+ ### Assumptions
22
+
23
+ {List key assumptions made in this decision}
24
+
25
+ - {Assumption 1}
26
+ - {Assumption 2}
27
+ - {Assumption 3}
28
+
29
+ ### Constraints
30
+
31
+ {List constraints that limit the solution space}
32
+
33
+ - {Constraint 1}
34
+ - {Constraint 2}
35
+ - {Constraint 3}
36
+
37
+ ---
38
+
39
+ ## Decision Drivers
40
+
41
+ {List the key factors that influenced this decision, in priority order}
42
+
43
+ 1. {High priority driver}
44
+ 2. {Medium priority driver}
45
+ 3. {Lower priority driver}
46
+
47
+ ---
48
+
49
+ ## Considered Options
50
+
51
+ ### Option 1: {Option Name}
52
+
53
+ **Description:** {Detailed description of this option}
54
+
55
+ **Pros:**
56
+ - {Advantage 1}
57
+ - {Advantage 2}
58
+ - {Advantage 3}
59
+
60
+ **Cons:**
61
+ - {Disadvantage 1}
62
+ - {Disadvantage 2}
63
+ - {Disadvantage 3}
64
+
65
+ **Cost/Effort:** {Estimation of implementation cost and effort}
66
+
67
+ **Risk:** {Risk assessment: Low | Medium | High}
68
+
69
+ ---
70
+
71
+ ### Option 2: {Option Name}
72
+
73
+ **Description:** {Detailed description of this option}
74
+
75
+ **Pros:**
76
+ - {Advantage 1}
77
+ - {Advantage 2}
78
+ - {Advantage 3}
79
+
80
+ **Cons:**
81
+ - {Disadvantage 1}
82
+ - {Disadvantage 2}
83
+ - {Disadvantage 3}
84
+
85
+ **Cost/Effort:** {Estimation of implementation cost and effort}
86
+
87
+ **Risk:** {Risk assessment: Low | Medium | High}
88
+
89
+ ---
90
+
91
+ ### Option 3: {Option Name}
92
+
93
+ **Description:** {Detailed description of this option}
94
+
95
+ **Pros:**
96
+ - {Advantage 1}
97
+ - {Advantage 2}
98
+ - {Advantage 3}
99
+
100
+ **Cons:**
101
+ - {Disadvantage 1}
102
+ - {Disadvantage 2}
103
+ - {Disadvantage 3}
104
+
105
+ **Cost/Effort:** {Estimation of implementation cost and effort}
106
+
107
+ **Risk:** {Risk assessment: Low | Medium | High}
108
+
109
+ ---
110
+
111
+ ## Decision Outcome
112
+
113
+ **Chosen option:** "{Option X}", because:
114
+
115
+ {Provide detailed justification for the chosen option. Explain how it best addresses the decision drivers and why it was preferred over the alternatives.}
116
+
117
+ ### Consequences
118
+
119
+ #### Positive Consequences
120
+
121
+ - {Positive consequence 1 with explanation}
122
+ - {Positive consequence 2 with explanation}
123
+ - {Positive consequence 3 with explanation}
124
+
125
+ #### Negative Consequences
126
+
127
+ - {Negative consequence 1 with mitigation strategy}
128
+ - {Negative consequence 2 with mitigation strategy}
129
+ - {Negative consequence 3 with mitigation strategy}
130
+
131
+ #### Neutral Consequences
132
+
133
+ - {Neutral consequence 1}
134
+ - {Neutral consequence 2}
135
+
136
+ ---
137
+
138
+ ## Validation
139
+
140
+ {How will we know if this decision was correct? Define success criteria and metrics.}
141
+
142
+ ### Success Criteria
143
+
144
+ - {Measurable criterion 1}
145
+ - {Measurable criterion 2}
146
+ - {Measurable criterion 3}
147
+
148
+ ### Metrics
149
+
150
+ - {Metric 1: baseline → target}
151
+ - {Metric 2: baseline → target}
152
+
153
+ ### Review Schedule
154
+
155
+ - {When to review this decision: e.g., "After 3 months" or "After first production deployment"}
156
+
157
+ ---
158
+
159
+ ## Implementation Plan
160
+
161
+ {Optional: High-level implementation plan}
162
+
163
+ ### Phase 1: {Phase Name}
164
+ - {Task 1}
165
+ - {Task 2}
166
+
167
+ ### Phase 2: {Phase Name}
168
+ - {Task 1}
169
+ - {Task 2}
170
+
171
+ ### Migration Strategy
172
+
173
+ {If applicable, describe how to migrate from current state to new state}
174
+
175
+ ---
176
+
177
+ ## More Information
178
+
179
+ ### References
180
+
181
+ - {Link to research, documentation, or external resources}
182
+ - {Link to proof of concept or prototype}
183
+ - {Link to similar decisions in other projects}
184
+
185
+ ### Related Decisions
186
+
187
+ - Supersedes: [ADR-{number}]({link})
188
+ - Superseded by: [ADR-{number}]({link})
189
+ - Related to: [ADR-{number}]({link})
190
+
191
+ ### Stakeholder Feedback
192
+
193
+ {Optional: Summary of feedback from key stakeholders}
194
+
195
+ - **{Stakeholder 1}:** {Feedback summary}
196
+ - **{Stakeholder 2}:** {Feedback summary}
197
+
@@ -0,0 +1,68 @@
1
+ # ADR-{number}: {Title}
2
+
3
+ **Status:** {Draft | Proposed | Approved | Implemented | Superseded | Deprecated}
4
+
5
+ **Date:** {YYYY-MM-DD}
6
+
7
+ **Deciders:** {List of people involved in the decision}
8
+
9
+ **Technical Story:** {Optional: Link to related issue, spec, or task}
10
+
11
+ ---
12
+
13
+ ## Context and Problem Statement
14
+
15
+ {Describe the context and problem statement in 2-3 sentences. What is the issue that motivates this decision?}
16
+
17
+ ---
18
+
19
+ ## Decision Drivers
20
+
21
+ {Optional: List the key factors that influenced this decision}
22
+
23
+ - {Driver 1}
24
+ - {Driver 2}
25
+ - {Driver 3}
26
+
27
+ ---
28
+
29
+ ## Considered Options
30
+
31
+ - {Option 1}
32
+ - {Option 2}
33
+ - {Option 3}
34
+
35
+ ---
36
+
37
+ ## Decision Outcome
38
+
39
+ **Chosen option:** "{Option X}", because {justification in 1-2 sentences}.
40
+
41
+ ### Consequences
42
+
43
+ - **Good:** {Positive consequence 1}
44
+ - **Good:** {Positive consequence 2}
45
+ - **Bad:** {Negative consequence 1}
46
+ - **Bad:** {Negative consequence 2}
47
+
48
+ ---
49
+
50
+ ## Validation
51
+
52
+ {Optional: How will we know if this decision was correct?}
53
+
54
+ - {Success criterion 1}
55
+ - {Success criterion 2}
56
+
57
+ ---
58
+
59
+ ## More Information
60
+
61
+ {Optional: Additional context, references, or implementation notes}
62
+
63
+ ### Links
64
+
65
+ - {Link to related documentation}
66
+ - {Link to implementation PR}
67
+ - {Link to related ADR}
68
+
@@ -0,0 +1,84 @@
1
+ # ADR-{number}: {Title}
2
+
3
+ **Status:** {Draft | Proposed | Approved | Implemented | Superseded | Deprecated}
4
+
5
+ **Date:** {YYYY-MM-DD}
6
+
7
+ **Deciders:** {List of people involved in the decision}
8
+
9
+ **Technical Story:** {Optional: Link to related issue, spec, or task}
10
+
11
+ ---
12
+
13
+ ## Context
14
+
15
+ {Describe the context and problem statement. What is the issue that motivates this decision or change?}
16
+
17
+ ### Forces
18
+
19
+ {Optional: Describe the forces at play (technical, political, social, project-related). These are the constraints and considerations that influence the decision.}
20
+
21
+ - {Force 1}
22
+ - {Force 2}
23
+ - {Force 3}
24
+
25
+ ---
26
+
27
+ ## Decision
28
+
29
+ {Describe the decision that was made. Use active voice: "We will..."}
30
+
31
+ ### Rationale
32
+
33
+ {Explain why this decision was made. What are the key reasons?}
34
+
35
+ ---
36
+
37
+ ## Consequences
38
+
39
+ ### Positive
40
+
41
+ {What becomes easier or better as a result of this decision?}
42
+
43
+ - {Positive consequence 1}
44
+ - {Positive consequence 2}
45
+
46
+ ### Negative
47
+
48
+ {What becomes harder or worse as a result of this decision?}
49
+
50
+ - {Negative consequence 1}
51
+ - {Negative consequence 2}
52
+
53
+ ### Neutral
54
+
55
+ {What are the neutral consequences or trade-offs?}
56
+
57
+ - {Neutral consequence 1}
58
+ - {Neutral consequence 2}
59
+
60
+ ---
61
+
62
+ ## Related Decisions
63
+
64
+ {Optional: List related ADRs}
65
+
66
+ - Supersedes: [ADR-{number}]({link})
67
+ - Superseded by: [ADR-{number}]({link})
68
+ - Related to: [ADR-{number}]({link})
69
+
70
+ ---
71
+
72
+ ## Notes
73
+
74
+ {Optional: Any additional notes, references, or links}
75
+
76
+ ### References
77
+
78
+ - {Reference 1}
79
+ - {Reference 2}
80
+
81
+ ### Implementation Notes
82
+
83
+ {Optional: Notes about implementation, migration path, or timeline}
84
+
@@ -0,0 +1,6 @@
1
+ /**
2
+ * ADR Validator Usage Examples
3
+ * Demonstrates how to use the ADR validation module
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=adr-validator.example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adr-validator.example.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/adr-validator.example.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ /**
3
+ * ADR Validator Usage Examples
4
+ * Demonstrates how to use the ADR validation module
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const adr_validator_1 = require("../adr-validator");
8
+ // Example 1: Validate a complete ADR
9
+ function example1_ValidateCompleteADR() {
10
+ const adr = {
11
+ id: 'adr-0001',
12
+ title: 'Use PostgreSQL for Database',
13
+ status: 'approved',
14
+ date: '2024-01-15',
15
+ deciders: ['Alice', 'Bob'],
16
+ tags: ['database', 'infrastructure'],
17
+ supersedes: [],
18
+ related_decisions: []
19
+ };
20
+ const result = (0, adr_validator_1.validateADR)(adr);
21
+ if (result.valid) {
22
+ console.log('✅ ADR is valid!');
23
+ }
24
+ else {
25
+ console.log('❌ ADR has errors:');
26
+ result.errors?.forEach(error => console.log(` - ${error}`));
27
+ }
28
+ if (result.warnings && result.warnings.length > 0) {
29
+ console.log('⚠️ ADR has warnings:');
30
+ result.warnings.forEach(warning => console.log(` - ${warning}`));
31
+ }
32
+ }
33
+ // Example 2: Validate only metadata (required fields)
34
+ function example2_ValidateMetadataOnly() {
35
+ const adr = {
36
+ id: 'adr-0002',
37
+ title: 'Implement Caching Strategy',
38
+ status: 'draft',
39
+ date: '2024-01-16',
40
+ deciders: ['Charlie']
41
+ };
42
+ const result = (0, adr_validator_1.validateMetadata)(adr);
43
+ console.log(`Metadata valid: ${result.valid}`);
44
+ if (!result.valid) {
45
+ console.log('Errors:', result.errors);
46
+ }
47
+ }
48
+ // Example 3: Validate file naming
49
+ function example3_ValidateFileName() {
50
+ const validNames = [
51
+ 'adr/0001-use-postgresql.md',
52
+ 'adr/0042-implement-caching.md'
53
+ ];
54
+ const invalidNames = [
55
+ 'adr/1-use-postgresql.md',
56
+ 'adr/0001-Use-PostgreSQL.md'
57
+ ];
58
+ console.log('Valid file names:');
59
+ validNames.forEach(name => {
60
+ const result = (0, adr_validator_1.validateFileName)(name);
61
+ console.log(` ${name}: ${result.valid ? '✅' : '❌'}`);
62
+ });
63
+ console.log('\nInvalid file names:');
64
+ invalidNames.forEach(name => {
65
+ const result = (0, adr_validator_1.validateFileName)(name);
66
+ console.log(` ${name}: ${result.valid ? '✅' : '❌'}`);
67
+ if (!result.valid) {
68
+ console.log(` Error: ${result.errors?.[0]}`);
69
+ }
70
+ });
71
+ }
72
+ // Example 4: Validate ADR references
73
+ function example4_ValidateReferences() {
74
+ const adr1 = {
75
+ id: 'adr-0001',
76
+ title: 'First Decision',
77
+ status: 'approved',
78
+ date: '2024-01-15',
79
+ deciders: ['Alice']
80
+ };
81
+ const adr2 = {
82
+ id: 'adr-0002',
83
+ title: 'Second Decision',
84
+ status: 'approved',
85
+ date: '2024-01-16',
86
+ deciders: ['Bob'],
87
+ supersedes: ['adr-0001'],
88
+ related_decisions: ['adr-0001']
89
+ };
90
+ const allADRs = [adr1, adr2];
91
+ const result = (0, adr_validator_1.validateADRReferences)(adr2, allADRs);
92
+ console.log(`References valid: ${result.valid}`);
93
+ if (!result.valid) {
94
+ console.log('Warnings:', result.warnings);
95
+ }
96
+ }
97
+ // Example 5: Validate content quality
98
+ function example5_ValidateContentQuality() {
99
+ const goodContent = 'This is a well-written ADR with proper content.';
100
+ const badContent = 'TODO: Write this section. FIXME: Review later.';
101
+ console.log('Good content:');
102
+ const result1 = (0, adr_validator_1.validateContentQuality)(goodContent);
103
+ console.log(` Valid: ${result1.valid}`);
104
+ console.log('\nBad content:');
105
+ const result2 = (0, adr_validator_1.validateContentQuality)(badContent);
106
+ console.log(` Valid: ${result2.valid}`);
107
+ console.log(' Warnings:', result2.warnings);
108
+ }
109
+ // Example 6: Validate context section
110
+ function example6_ValidateContext() {
111
+ const goodContext = 'We face a problem with database scalability. The current system cannot handle the growing load.';
112
+ const badContext = 'We will use PostgreSQL.';
113
+ console.log('Good context:');
114
+ const result1 = (0, adr_validator_1.validateContext)(goodContext);
115
+ console.log(` Valid: ${result1.valid}`);
116
+ console.log('\nBad context:');
117
+ const result2 = (0, adr_validator_1.validateContext)(badContext);
118
+ console.log(` Valid: ${result2.valid}`);
119
+ console.log(' Warnings:', result2.warnings);
120
+ }
121
+ // Example 7: Handle validation errors gracefully
122
+ function example7_HandleValidationErrors() {
123
+ const invalidADR = {
124
+ id: 'invalid',
125
+ title: 'Short',
126
+ status: 'invalid',
127
+ date: 'invalid',
128
+ deciders: []
129
+ };
130
+ const result = (0, adr_validator_1.validateADR)(invalidADR);
131
+ if (!result.valid) {
132
+ console.log('❌ Validation failed with the following errors:');
133
+ result.errors?.forEach((error, index) => {
134
+ console.log(` ${index + 1}. ${error}`);
135
+ });
136
+ // You might want to throw an error or return early
137
+ throw new Error('ADR validation failed');
138
+ }
139
+ }
140
+ // Run examples (commented out to prevent execution during import)
141
+ // example1_ValidateCompleteADR();
142
+ // example2_ValidateMetadataOnly();
143
+ // example3_ValidateFileName();
144
+ // example4_ValidateReferences();
145
+ // example5_ValidateContentQuality();
146
+ // example6_ValidateContext();
147
+ // example7_HandleValidationErrors();
148
+ //# sourceMappingURL=adr-validator.example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adr-validator.example.js","sourceRoot":"","sources":["../../../src/utils/__tests__/adr-validator.example.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,oDAS0B;AAE1B,qCAAqC;AACrC,SAAS,4BAA4B;IACnC,MAAM,GA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AC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,kEAAkE;AAClE,kCAAkC;AAClC,mCAAmC;AACnC,+BAA+B;AAC/B,iCAAiC;AACjC,qCAAqC;AACrC,8BAA8B;AAC9B,qCAAqC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * ADR Validation Module
3
+ * Implements validation logic for Architecture Decision Records (ADRs)
4
+ * Based on augment-extensions/workflows/adr-support/rules/validation-rules.md
5
+ */
6
+ export interface ADR {
7
+ id: string;
8
+ title: string;
9
+ status: string;
10
+ date: string;
11
+ deciders: string[];
12
+ consulted?: string[];
13
+ informed?: string[];
14
+ tags?: string[];
15
+ supersedes?: string[];
16
+ superseded_by?: string;
17
+ related_decisions?: string[];
18
+ related_specs?: string[];
19
+ related_tasks?: string[];
20
+ }
21
+ export interface ValidationResult {
22
+ valid: boolean;
23
+ errors?: string[];
24
+ warnings?: string[];
25
+ }
26
+ /**
27
+ * Validates ISO 8601 date format (YYYY-MM-DD)
28
+ */
29
+ export declare function isValidISO8601(date: string): boolean;
30
+ /**
31
+ * Validates required metadata fields
32
+ * Level 1: Structural Validation (Required)
33
+ */
34
+ export declare function validateMetadata(adr: ADR): ValidationResult;
35
+ /**
36
+ * Validates optional metadata fields
37
+ * Level 2: Content Validation (Warning)
38
+ */
39
+ export declare function validateOptionalFields(adr: ADR): ValidationResult;
40
+ /**
41
+ * Validates file naming convention
42
+ * Format: adr/NNNN-brief-title.md
43
+ */
44
+ export declare function validateFileName(filePath: string): ValidationResult;
45
+ /**
46
+ * Validates ADR references
47
+ * Level 3: Reference Validation (Warning)
48
+ */
49
+ export declare function validateADRReferences(adr: ADR, allADRs: ADR[]): ValidationResult;
50
+ /**
51
+ * Validates content quality
52
+ * Checks for placeholder text and minimum content length
53
+ */
54
+ export declare function validateContentQuality(content: string): ValidationResult;
55
+ /**
56
+ * Validates context section content
57
+ * Ensures context explains "why" not "how"
58
+ */
59
+ export declare function validateContext(context: string): ValidationResult;
60
+ /**
61
+ * Comprehensive ADR validation
62
+ * Runs all validation checks and aggregates results
63
+ */
64
+ export declare function validateADR(adr: ADR, allADRs?: ADR[]): ValidationResult;
65
+ //# sourceMappingURL=adr-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adr-validator.d.ts","sourceRoot":"","sources":["../../src/utils/adr-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQpD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,CAsC3D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,CA2BjE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CASnE;AAED;;;GAGG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