@mytechtoday/augment-extensions 1.3.0 → 1.4.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/LICENSE +22 -22
- package/README.md +105 -6
- package/augment-extensions/domain-rules/software-architecture/README.md +143 -143
- package/augment-extensions/domain-rules/software-architecture/examples/banking-layered.md +961 -961
- package/augment-extensions/domain-rules/software-architecture/examples/ecommerce-microservices.md +990 -990
- package/augment-extensions/domain-rules/software-architecture/examples/iot-eventdriven.md +882 -882
- package/augment-extensions/domain-rules/software-architecture/examples/monolith-to-microservices-migration.md +703 -703
- package/augment-extensions/domain-rules/software-architecture/examples/serverless-imageprocessing.md +957 -957
- package/augment-extensions/domain-rules/software-architecture/examples/trading-eventdriven.md +747 -747
- package/augment-extensions/domain-rules/software-architecture/module.json +119 -119
- package/augment-extensions/domain-rules/software-architecture/rules/challenges-solutions.md +763 -763
- package/augment-extensions/domain-rules/software-architecture/rules/definitions-terminology.md +409 -409
- package/augment-extensions/domain-rules/software-architecture/rules/design-principles.md +684 -684
- package/augment-extensions/domain-rules/software-architecture/rules/evaluation-testing.md +1381 -1381
- package/augment-extensions/domain-rules/software-architecture/rules/event-driven-architecture.md +616 -616
- package/augment-extensions/domain-rules/software-architecture/rules/fundamentals.md +306 -306
- package/augment-extensions/domain-rules/software-architecture/rules/industry-architectures.md +554 -554
- package/augment-extensions/domain-rules/software-architecture/rules/layered-architecture.md +776 -776
- package/augment-extensions/domain-rules/software-architecture/rules/microservices-architecture.md +503 -503
- package/augment-extensions/domain-rules/software-architecture/rules/modeling-documentation.md +1199 -1199
- package/augment-extensions/domain-rules/software-architecture/rules/monolithic-architecture.md +351 -351
- package/augment-extensions/domain-rules/software-architecture/rules/principles.md +556 -556
- package/augment-extensions/domain-rules/software-architecture/rules/quality-attributes.md +797 -797
- package/augment-extensions/domain-rules/software-architecture/rules/scalability-performance.md +1345 -1345
- package/augment-extensions/domain-rules/software-architecture/rules/security-architecture.md +1039 -1039
- package/augment-extensions/domain-rules/software-architecture/rules/serverless-architecture.md +711 -711
- package/augment-extensions/domain-rules/software-architecture/rules/skills-development.md +568 -568
- package/augment-extensions/domain-rules/software-architecture/rules/tools-methodologies.md +961 -961
- package/augment-extensions/visual-design/CHANGELOG.md +132 -132
- package/augment-extensions/visual-design/README.md +255 -255
- package/augment-extensions/visual-design/__tests__/README.md +119 -119
- package/augment-extensions/visual-design/__tests__/style-selector.test.ts +172 -172
- package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +214 -214
- package/augment-extensions/visual-design/domains/other/ai-prompt-helper.ts +157 -157
- package/augment-extensions/visual-design/domains/other/dotnet-application.ts +156 -156
- package/augment-extensions/visual-design/domains/other/linux-platform.ts +156 -156
- package/augment-extensions/visual-design/domains/other/mobile-application.ts +157 -157
- package/augment-extensions/visual-design/domains/other/motion-picture.ts +156 -156
- package/augment-extensions/visual-design/domains/other/os-application.ts +156 -156
- package/augment-extensions/visual-design/domains/other/print-campaigns.ts +158 -158
- package/augment-extensions/visual-design/domains/other/web-app.ts +157 -157
- package/augment-extensions/visual-design/domains/other/website.ts +161 -161
- package/augment-extensions/visual-design/domains/other/windows-platform.ts +156 -156
- package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +506 -506
- package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +615 -615
- package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +531 -531
- package/augment-extensions/visual-design/examples/README.md +97 -97
- package/augment-extensions/visual-design/examples/ai-prompt-generation.md +233 -233
- package/augment-extensions/visual-design/examples/basic-usage.md +216 -216
- package/augment-extensions/visual-design/examples/domain-workflows.md +257 -257
- package/augment-extensions/visual-design/examples/vendor-comparison.md +247 -247
- package/augment-extensions/visual-design/module.json +78 -78
- package/augment-extensions/visual-design/style-selector.ts +177 -177
- package/augment-extensions/visual-design/types.ts +302 -302
- package/augment-extensions/visual-design/visual-design-core.ts +469 -469
- package/augment-extensions/workflows/adr-support/README.md +227 -227
- package/augment-extensions/workflows/adr-support/__tests__/adr-validator.test.ts +203 -203
- package/augment-extensions/workflows/adr-support/adr-validator.ts +162 -162
- package/augment-extensions/workflows/adr-support/examples/complete-lifecycle-example.md +449 -449
- package/augment-extensions/workflows/adr-support/examples/integration-example.md +580 -580
- package/augment-extensions/workflows/adr-support/examples/superseding-example.md +436 -436
- package/augment-extensions/workflows/adr-support/module.json +112 -112
- package/augment-extensions/workflows/adr-support/rules/adr-creation.md +372 -372
- package/augment-extensions/workflows/adr-support/rules/beads-integration.md +443 -443
- package/augment-extensions/workflows/adr-support/rules/conflict-detection.md +486 -486
- package/augment-extensions/workflows/adr-support/rules/decision-detection.md +362 -362
- package/augment-extensions/workflows/adr-support/rules/lifecycle-management.md +427 -427
- package/augment-extensions/workflows/adr-support/rules/openspec-integration.md +465 -465
- package/augment-extensions/workflows/adr-support/rules/template-selection.md +405 -405
- package/augment-extensions/workflows/adr-support/rules/validation-rules.md +543 -543
- package/augment-extensions/workflows/adr-support/schemas/adr-config.json +191 -191
- package/augment-extensions/workflows/adr-support/schemas/adr-metadata.json +172 -172
- package/augment-extensions/workflows/adr-support/templates/business-case.md +235 -235
- package/augment-extensions/workflows/adr-support/templates/madr-elaborate.md +197 -197
- package/augment-extensions/workflows/adr-support/templates/madr-simple.md +68 -68
- package/augment-extensions/workflows/adr-support/templates/nygard.md +84 -84
- package/augment-extensions/writing-standards/screenplay/rules/file-organization.md +213 -213
- package/augment-extensions/writing-standards/screenplay/utils/__tests__/file-organization.test.ts +169 -169
- package/augment-extensions/writing-standards/screenplay/utils/file-organization.ts +165 -165
- package/cli/dist/commands/agent.d.ts +37 -0
- package/cli/dist/commands/agent.d.ts.map +1 -0
- package/cli/dist/commands/agent.js +222 -0
- package/cli/dist/commands/agent.js.map +1 -0
- package/cli/dist/commands/beads.d.ts +64 -0
- package/cli/dist/commands/beads.d.ts.map +1 -0
- package/cli/dist/commands/beads.js +377 -0
- package/cli/dist/commands/beads.js.map +1 -0
- package/cli/dist/commands/change.d.ts +54 -0
- package/cli/dist/commands/change.d.ts.map +1 -0
- package/cli/dist/commands/change.js +243 -0
- package/cli/dist/commands/change.js.map +1 -0
- package/cli/dist/commands/clean.d.ts +15 -0
- package/cli/dist/commands/clean.d.ts.map +1 -0
- package/cli/dist/commands/clean.js +63 -0
- package/cli/dist/commands/clean.js.map +1 -0
- package/cli/dist/commands/clone.d.ts +15 -0
- package/cli/dist/commands/clone.d.ts.map +1 -0
- package/cli/dist/commands/clone.js +49 -0
- package/cli/dist/commands/clone.js.map +1 -0
- package/cli/dist/commands/config.d.ts +33 -0
- package/cli/dist/commands/config.d.ts.map +1 -0
- package/cli/dist/commands/config.js +166 -0
- package/cli/dist/commands/config.js.map +1 -0
- package/cli/dist/commands/context.d.ts +38 -0
- package/cli/dist/commands/context.d.ts.map +1 -0
- package/cli/dist/commands/context.js +205 -0
- package/cli/dist/commands/context.js.map +1 -0
- package/cli/dist/commands/create.d.ts +18 -0
- package/cli/dist/commands/create.d.ts.map +1 -0
- package/cli/dist/commands/create.js +178 -0
- package/cli/dist/commands/create.js.map +1 -0
- package/cli/dist/commands/diff.d.ts +19 -0
- package/cli/dist/commands/diff.d.ts.map +1 -0
- package/cli/dist/commands/diff.js +104 -0
- package/cli/dist/commands/diff.js.map +1 -0
- package/cli/dist/commands/doctor.d.ts +14 -0
- package/cli/dist/commands/doctor.d.ts.map +1 -0
- package/cli/dist/commands/doctor.js +62 -0
- package/cli/dist/commands/doctor.js.map +1 -0
- package/cli/dist/commands/export.d.ts +28 -0
- package/cli/dist/commands/export.d.ts.map +1 -0
- package/cli/dist/commands/export.js +135 -0
- package/cli/dist/commands/export.js.map +1 -0
- package/cli/dist/commands/import.d.ts +23 -0
- package/cli/dist/commands/import.d.ts.map +1 -0
- package/cli/dist/commands/import.js +118 -0
- package/cli/dist/commands/import.js.map +1 -0
- package/cli/dist/commands/prompt.d.ts +45 -0
- package/cli/dist/commands/prompt.d.ts.map +1 -0
- package/cli/dist/commands/prompt.js +223 -0
- package/cli/dist/commands/prompt.js.map +1 -0
- package/cli/dist/commands/spec.d.ts +57 -0
- package/cli/dist/commands/spec.d.ts.map +1 -0
- package/cli/dist/commands/spec.js +279 -0
- package/cli/dist/commands/spec.js.map +1 -0
- package/cli/dist/commands/stats.d.ts +18 -0
- package/cli/dist/commands/stats.d.ts.map +1 -0
- package/cli/dist/commands/stats.js +85 -0
- package/cli/dist/commands/stats.js.map +1 -0
- package/cli/dist/commands/task.d.ts +65 -0
- package/cli/dist/commands/task.d.ts.map +1 -0
- package/cli/dist/commands/task.js +282 -0
- package/cli/dist/commands/task.js.map +1 -0
- package/cli/dist/commands/template.d.ts +17 -0
- package/cli/dist/commands/template.d.ts.map +1 -0
- package/cli/dist/commands/template.js +55 -0
- package/cli/dist/commands/template.js.map +1 -0
- package/cli/dist/utils/agent-config.d.ts +129 -0
- package/cli/dist/utils/agent-config.d.ts.map +1 -0
- package/cli/dist/utils/agent-config.js +297 -0
- package/cli/dist/utils/agent-config.js.map +1 -0
- package/cli/dist/utils/auto-sync.js +19 -19
- package/cli/dist/utils/beads-graph.d.ts +17 -0
- package/cli/dist/utils/beads-graph.d.ts.map +1 -0
- package/cli/dist/utils/beads-graph.js +150 -0
- package/cli/dist/utils/beads-graph.js.map +1 -0
- package/cli/dist/utils/beads-integration.d.ts +112 -0
- package/cli/dist/utils/beads-integration.d.ts.map +1 -0
- package/cli/dist/utils/beads-integration.js +312 -0
- package/cli/dist/utils/beads-integration.js.map +1 -0
- package/cli/dist/utils/beads-reporter.d.ts +17 -0
- package/cli/dist/utils/beads-reporter.d.ts.map +1 -0
- package/cli/dist/utils/beads-reporter.js +160 -0
- package/cli/dist/utils/beads-reporter.js.map +1 -0
- package/cli/dist/utils/cache-manager.d.ts +55 -0
- package/cli/dist/utils/cache-manager.d.ts.map +1 -0
- package/cli/dist/utils/cache-manager.js +150 -0
- package/cli/dist/utils/cache-manager.js.map +1 -0
- package/cli/dist/utils/change-manager.d.ts +70 -0
- package/cli/dist/utils/change-manager.d.ts.map +1 -0
- package/cli/dist/utils/change-manager.js +412 -0
- package/cli/dist/utils/change-manager.js.map +1 -0
- package/cli/dist/utils/config-manager-enhanced.d.ts +66 -0
- package/cli/dist/utils/config-manager-enhanced.d.ts.map +1 -0
- package/cli/dist/utils/config-manager-enhanced.js +77 -0
- package/cli/dist/utils/config-manager-enhanced.js.map +1 -0
- package/cli/dist/utils/context-manager.d.ts +96 -0
- package/cli/dist/utils/context-manager.d.ts.map +1 -0
- package/cli/dist/utils/context-manager.js +258 -0
- package/cli/dist/utils/context-manager.js.map +1 -0
- package/cli/dist/utils/diff-engine.d.ts +78 -0
- package/cli/dist/utils/diff-engine.d.ts.map +1 -0
- package/cli/dist/utils/diff-engine.js +233 -0
- package/cli/dist/utils/diff-engine.js.map +1 -0
- package/cli/dist/utils/export-system.d.ts +101 -0
- package/cli/dist/utils/export-system.d.ts.map +1 -0
- package/cli/dist/utils/export-system.js +289 -0
- package/cli/dist/utils/export-system.js.map +1 -0
- package/cli/dist/utils/health-checker.d.ts +66 -0
- package/cli/dist/utils/health-checker.d.ts.map +1 -0
- package/cli/dist/utils/health-checker.js +285 -0
- package/cli/dist/utils/health-checker.js.map +1 -0
- package/cli/dist/utils/import-system.d.ts +74 -0
- package/cli/dist/utils/import-system.d.ts.map +1 -0
- package/cli/dist/utils/import-system.js +317 -0
- package/cli/dist/utils/import-system.js.map +1 -0
- package/cli/dist/utils/module-cloner.d.ts +40 -0
- package/cli/dist/utils/module-cloner.d.ts.map +1 -0
- package/cli/dist/utils/module-cloner.js +136 -0
- package/cli/dist/utils/module-cloner.js.map +1 -0
- package/cli/dist/utils/prompt-manager.d.ts +90 -0
- package/cli/dist/utils/prompt-manager.d.ts.map +1 -0
- package/cli/dist/utils/prompt-manager.js +302 -0
- package/cli/dist/utils/prompt-manager.js.map +1 -0
- package/cli/dist/utils/spec-manager.d.ts +65 -0
- package/cli/dist/utils/spec-manager.d.ts.map +1 -0
- package/cli/dist/utils/spec-manager.js +329 -0
- package/cli/dist/utils/spec-manager.js.map +1 -0
- package/cli/dist/utils/stats-collector.d.ts +74 -0
- package/cli/dist/utils/stats-collector.d.ts.map +1 -0
- package/cli/dist/utils/stats-collector.js +164 -0
- package/cli/dist/utils/stats-collector.js.map +1 -0
- package/cli/dist/utils/template-engine.d.ts +47 -0
- package/cli/dist/utils/template-engine.d.ts.map +1 -0
- package/cli/dist/utils/template-engine.js +204 -0
- package/cli/dist/utils/template-engine.js.map +1 -0
- package/package.json +12 -3
- package/augment-extensions/workflows/openspec/README.md +0 -96
- package/augment-extensions/workflows/openspec/examples/complete-change-example.md +0 -244
- package/augment-extensions/workflows/openspec/module.json +0 -54
- package/augment-extensions/workflows/openspec/rules/best-practices.md +0 -272
- package/augment-extensions/workflows/openspec/rules/manual-setup.md +0 -231
- package/augment-extensions/workflows/openspec/rules/spec-format.md +0 -236
- package/augment-extensions/workflows/openspec/rules/workflow.md +0 -214
- package/cli/dist/utils/__tests__/adr-validator.example.d.ts +0 -6
- package/cli/dist/utils/__tests__/adr-validator.example.d.ts.map +0 -1
- package/cli/dist/utils/__tests__/adr-validator.example.js +0 -148
- package/cli/dist/utils/__tests__/adr-validator.example.js.map +0 -1
- package/cli/dist/utils/adr-validator.d.ts +0 -65
- package/cli/dist/utils/adr-validator.d.ts.map +0 -1
- package/cli/dist/utils/adr-validator.js +0 -203
- package/cli/dist/utils/adr-validator.js.map +0 -1
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
# OpenSpec Specification Format
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
OpenSpec uses a structured markdown format for specifications. Specs live in two places:
|
|
6
|
-
|
|
7
|
-
- **`openspec/specs/`** - Current specifications (source of truth)
|
|
8
|
-
- **`openspec/changes/<change-name>/specs/`** - Proposed changes (deltas)
|
|
9
|
-
|
|
10
|
-
## Spec Structure
|
|
11
|
-
|
|
12
|
-
### Source Spec with Frontmatter (openspec/specs/auth/spec.md)
|
|
13
|
-
|
|
14
|
-
```markdown
|
|
15
|
-
---
|
|
16
|
-
id: auth/authentication
|
|
17
|
-
relatedTasks: [bd-a1b2, bd-b2c3]
|
|
18
|
-
relatedRules: [security-guidelines.md, module-development.md]
|
|
19
|
-
status: active
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
# Auth Specification
|
|
23
|
-
|
|
24
|
-
## Purpose
|
|
25
|
-
Authentication and session management.
|
|
26
|
-
|
|
27
|
-
## Requirements
|
|
28
|
-
|
|
29
|
-
### Requirement: User Authentication
|
|
30
|
-
The system SHALL issue a JWT on successful login.
|
|
31
|
-
|
|
32
|
-
#### Scenario: Valid credentials
|
|
33
|
-
- WHEN a user submits valid credentials
|
|
34
|
-
- THEN a JWT is returned
|
|
35
|
-
- AND the JWT contains user ID and role
|
|
36
|
-
|
|
37
|
-
#### Scenario: Invalid credentials
|
|
38
|
-
- WHEN a user submits invalid credentials
|
|
39
|
-
- THEN an error is returned
|
|
40
|
-
- AND no JWT is issued
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Delta Spec (openspec/changes/add-2fa/specs/auth/spec.md)
|
|
44
|
-
|
|
45
|
-
```markdown
|
|
46
|
-
# Delta for Auth
|
|
47
|
-
|
|
48
|
-
## ADDED Requirements
|
|
49
|
-
|
|
50
|
-
### Requirement: Two-Factor Authentication
|
|
51
|
-
The system MUST require a second factor during login.
|
|
52
|
-
|
|
53
|
-
#### Scenario: OTP required
|
|
54
|
-
- WHEN a user submits valid credentials
|
|
55
|
-
- THEN an OTP challenge is required
|
|
56
|
-
- AND the OTP is sent to the user's registered device
|
|
57
|
-
|
|
58
|
-
#### Scenario: Valid OTP
|
|
59
|
-
- WHEN a user submits a valid OTP
|
|
60
|
-
- THEN a JWT is issued
|
|
61
|
-
- AND the user is logged in
|
|
62
|
-
|
|
63
|
-
## MODIFIED Requirements
|
|
64
|
-
|
|
65
|
-
### Requirement: User Authentication
|
|
66
|
-
The system SHALL issue a JWT on successful login after two-factor verification.
|
|
67
|
-
|
|
68
|
-
#### Scenario: Valid credentials
|
|
69
|
-
- WHEN a user submits valid credentials
|
|
70
|
-
- THEN an OTP challenge is required (CHANGED)
|
|
71
|
-
- AND no JWT is issued until OTP verification (ADDED)
|
|
72
|
-
|
|
73
|
-
## REMOVED Requirements
|
|
74
|
-
|
|
75
|
-
(None for this change)
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## YAML Frontmatter (Optional)
|
|
79
|
-
|
|
80
|
-
Specs can include YAML frontmatter for coordination with Beads tasks and `.augment/` rules:
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
---
|
|
84
|
-
id: auth/authentication
|
|
85
|
-
relatedTasks: [bd-a1b2, bd-b2c3]
|
|
86
|
-
relatedRules: [security-guidelines.md, module-development.md]
|
|
87
|
-
status: active
|
|
88
|
-
dependencies: [database/schema]
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
# Spec Content
|
|
92
|
-
...
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Frontmatter Fields
|
|
96
|
-
|
|
97
|
-
- **id** (string): Unique spec identifier (e.g., "auth/authentication", "features/2fa")
|
|
98
|
-
- **relatedTasks** (array): Beads task IDs implementing this spec (e.g., ["bd-a1b2"])
|
|
99
|
-
- **relatedRules** (array): `.augment/` rule files that apply (e.g., ["security-guidelines.md"])
|
|
100
|
-
- **status** (string): One of: `draft`, `active`, `archived`, `deprecated`
|
|
101
|
-
- **dependencies** (array): Other spec IDs this spec depends on (optional)
|
|
102
|
-
|
|
103
|
-
### Benefits
|
|
104
|
-
|
|
105
|
-
- **Automatic Traceability**: Link specs to implementing tasks
|
|
106
|
-
- **Context Loading**: AI agents load relevant rules automatically
|
|
107
|
-
- **Coordination**: Integration with coordination manifest (`.augment/coordination.json`)
|
|
108
|
-
- **Dependency Tracking**: Track spec dependencies
|
|
109
|
-
|
|
110
|
-
**Note**: Frontmatter is optional and backward compatible. Specs without frontmatter continue to work normally.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Delta Format Rules
|
|
115
|
-
|
|
116
|
-
### Section Headers
|
|
117
|
-
|
|
118
|
-
Use these exact headers in delta specs:
|
|
119
|
-
|
|
120
|
-
- `## ADDED Requirements` - New capabilities
|
|
121
|
-
- `## MODIFIED Requirements` - Changed behavior
|
|
122
|
-
- `## REMOVED Requirements` - Deprecated features
|
|
123
|
-
|
|
124
|
-
### Requirement Format
|
|
125
|
-
|
|
126
|
-
```markdown
|
|
127
|
-
### Requirement: <Name>
|
|
128
|
-
The system SHALL/MUST/SHOULD <requirement text>.
|
|
129
|
-
|
|
130
|
-
#### Scenario: <Scenario Name>
|
|
131
|
-
- WHEN <condition>
|
|
132
|
-
- THEN <expected behavior>
|
|
133
|
-
- AND <additional expectation>
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Keywords
|
|
137
|
-
|
|
138
|
-
- **SHALL** - Mandatory requirement
|
|
139
|
-
- **MUST** - Mandatory requirement (stronger)
|
|
140
|
-
- **SHOULD** - Recommended but not mandatory
|
|
141
|
-
- **MAY** - Optional
|
|
142
|
-
|
|
143
|
-
### Scenario Format
|
|
144
|
-
|
|
145
|
-
Use Given-When-Then style:
|
|
146
|
-
|
|
147
|
-
- **GIVEN** - Initial context (optional)
|
|
148
|
-
- **WHEN** - Action or condition
|
|
149
|
-
- **THEN** - Expected result
|
|
150
|
-
- **AND** - Additional conditions/results
|
|
151
|
-
|
|
152
|
-
## Example: Complete Change
|
|
153
|
-
|
|
154
|
-
### Proposal (openspec/changes/add-2fa/proposal.md)
|
|
155
|
-
|
|
156
|
-
```markdown
|
|
157
|
-
# Add Two-Factor Authentication
|
|
158
|
-
|
|
159
|
-
## Motivation
|
|
160
|
-
Users need stronger account security. Passwords alone are insufficient.
|
|
161
|
-
|
|
162
|
-
## Changes
|
|
163
|
-
- Add OTP generation and verification
|
|
164
|
-
- Modify login flow to require 2FA
|
|
165
|
-
- Add user settings for 2FA enrollment
|
|
166
|
-
|
|
167
|
-
## Impact
|
|
168
|
-
- Breaking change: All users must enroll in 2FA
|
|
169
|
-
- Database migration required
|
|
170
|
-
- Frontend login flow changes
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Tasks (openspec/changes/add-2fa/tasks.md)
|
|
174
|
-
|
|
175
|
-
```markdown
|
|
176
|
-
## 1. Database Setup
|
|
177
|
-
- [ ] 1.1 Add OTP secret column to users table
|
|
178
|
-
- [ ] 1.2 Create OTP verification logs table
|
|
179
|
-
- [ ] 1.3 Add migration script
|
|
180
|
-
|
|
181
|
-
## 2. Backend Implementation
|
|
182
|
-
- [ ] 2.1 Add OTP generation endpoint
|
|
183
|
-
- [ ] 2.2 Modify login flow to require OTP
|
|
184
|
-
- [ ] 2.3 Add OTP verification endpoint
|
|
185
|
-
- [ ] 2.4 Add 2FA enrollment endpoint
|
|
186
|
-
|
|
187
|
-
## 3. Frontend Updates
|
|
188
|
-
- [ ] 3.1 Create OTP input component
|
|
189
|
-
- [ ] 3.2 Update login flow UI
|
|
190
|
-
- [ ] 3.3 Add 2FA settings page
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Spec Delta (openspec/changes/add-2fa/specs/auth/spec.md)
|
|
194
|
-
|
|
195
|
-
See example above in "Delta Spec" section.
|
|
196
|
-
|
|
197
|
-
## Archiving Process
|
|
198
|
-
|
|
199
|
-
When archiving, the delta is applied to the source spec:
|
|
200
|
-
|
|
201
|
-
1. **ADDED** sections are appended to source spec
|
|
202
|
-
2. **MODIFIED** sections replace existing requirements
|
|
203
|
-
3. **REMOVED** sections are deleted from source spec
|
|
204
|
-
|
|
205
|
-
Result: `openspec/specs/auth/spec.md` now includes 2FA requirements.
|
|
206
|
-
|
|
207
|
-
## Best Practices
|
|
208
|
-
|
|
209
|
-
1. **One Spec Per Component**: Don't mix auth and profile specs
|
|
210
|
-
2. **Complete Scenarios**: Every requirement needs at least one scenario
|
|
211
|
-
3. **Clear Language**: Use SHALL/MUST for clarity
|
|
212
|
-
4. **Atomic Changes**: Each delta should be independently reviewable
|
|
213
|
-
5. **Update Existing**: Use MODIFIED for changes, not ADDED + REMOVED
|
|
214
|
-
|
|
215
|
-
## Validation
|
|
216
|
-
|
|
217
|
-
### With CLI
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
openspec validate <change-name>
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
Checks:
|
|
224
|
-
- Required headers present
|
|
225
|
-
- Requirement format correct
|
|
226
|
-
- Scenario format valid
|
|
227
|
-
- No orphaned scenarios
|
|
228
|
-
|
|
229
|
-
### Without CLI
|
|
230
|
-
|
|
231
|
-
Manual checklist:
|
|
232
|
-
- [ ] All deltas have ADDED/MODIFIED/REMOVED sections
|
|
233
|
-
- [ ] Every requirement has a scenario
|
|
234
|
-
- [ ] Keywords (SHALL/MUST) used correctly
|
|
235
|
-
- [ ] Scenarios follow WHEN/THEN format
|
|
236
|
-
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
# OpenSpec Workflow Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
OpenSpec implements spec-driven development (SDD) where specifications are agreed upon before implementation. This workflow works with or without the OpenSpec CLI.
|
|
6
|
-
|
|
7
|
-
## Core Workflow
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
┌────────────────────┐
|
|
11
|
-
│ Draft Change │
|
|
12
|
-
│ Proposal │
|
|
13
|
-
└────────┬───────────┘
|
|
14
|
-
│ share intent with your AI
|
|
15
|
-
▼
|
|
16
|
-
┌────────────────────┐
|
|
17
|
-
│ Review & Align │
|
|
18
|
-
│ (edit specs/tasks) │◀──── feedback loop ──────┐
|
|
19
|
-
└────────┬───────────┘ │
|
|
20
|
-
│ approved plan │
|
|
21
|
-
▼ │
|
|
22
|
-
┌────────────────────┐ │
|
|
23
|
-
│ Implement Tasks │──────────────────────────┘
|
|
24
|
-
│ (AI writes code) │
|
|
25
|
-
└────────┬───────────┘
|
|
26
|
-
│ ship the change
|
|
27
|
-
▼
|
|
28
|
-
┌────────────────────┐
|
|
29
|
-
│ Archive & Update │
|
|
30
|
-
│ Specs (source) │
|
|
31
|
-
└────────────────────┘
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Coordination with Beads and .augment/
|
|
35
|
-
|
|
36
|
-
OpenSpec specs can include YAML frontmatter to coordinate with Beads tasks and `.augment/` rules:
|
|
37
|
-
|
|
38
|
-
```markdown
|
|
39
|
-
---
|
|
40
|
-
id: features/profile-search
|
|
41
|
-
relatedTasks: [bd-xyz, bd-abc]
|
|
42
|
-
relatedRules: [module-development.md]
|
|
43
|
-
status: active
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
# Profile Search Specification
|
|
47
|
-
...
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**Benefits**:
|
|
51
|
-
- **Traceability**: Link specs to implementing tasks
|
|
52
|
-
- **Context**: AI agents load relevant rules automatically
|
|
53
|
-
- **Coordination**: Integration with coordination manifest
|
|
54
|
-
|
|
55
|
-
See `.augment/rules/coordination-system.md` for details.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Step 1: Draft Change Proposal
|
|
60
|
-
|
|
61
|
-
### With CLI
|
|
62
|
-
|
|
63
|
-
Ask your AI agent:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
Create an OpenSpec change proposal for adding profile search filters by role and team
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Or use slash command (if supported):
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
/openspec:proposal Add profile search filters
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Without CLI
|
|
76
|
-
|
|
77
|
-
Ask your AI agent:
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
Create a new change folder in openspec/changes/add-profile-filters/ with:
|
|
81
|
-
1. proposal.md - describing the change
|
|
82
|
-
2. tasks.md - implementation checklist
|
|
83
|
-
3. specs/ - folder with spec deltas for affected components
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### What Gets Created
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
openspec/changes/add-profile-filters/
|
|
90
|
-
├── proposal.md # Why this change, what it does
|
|
91
|
-
├── tasks.md # Checklist of implementation steps
|
|
92
|
-
└── specs/
|
|
93
|
-
└── profile/
|
|
94
|
-
└── spec.md # Delta showing additions/modifications
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Step 2: Review & Align
|
|
98
|
-
|
|
99
|
-
### Validate (CLI only)
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
openspec validate add-profile-filters
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Review
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
# With CLI
|
|
109
|
-
openspec show add-profile-filters
|
|
110
|
-
|
|
111
|
-
# Without CLI - manually review files
|
|
112
|
-
cat openspec/changes/add-profile-filters/proposal.md
|
|
113
|
-
cat openspec/changes/add-profile-filters/tasks.md
|
|
114
|
-
cat openspec/changes/add-profile-filters/specs/profile/spec.md
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Iterate
|
|
118
|
-
|
|
119
|
-
Ask your AI to refine:
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
Can you add acceptance criteria for the role and team filters?
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
The tasks look good, but can you break down task 2.1 into smaller steps?
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Continue until specs match your requirements.
|
|
130
|
-
|
|
131
|
-
## Step 3: Implement Tasks
|
|
132
|
-
|
|
133
|
-
### With CLI
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
The specs look good. Let's implement this change.
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Or use slash command:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
/openspec:apply add-profile-filters
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Without CLI
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
Please implement the tasks in openspec/changes/add-profile-filters/tasks.md
|
|
149
|
-
Mark each task complete as you finish it.
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### AI Implementation Pattern
|
|
153
|
-
|
|
154
|
-
The AI agent will:
|
|
155
|
-
|
|
156
|
-
1. Read the spec deltas to understand requirements
|
|
157
|
-
2. Work through tasks.md sequentially
|
|
158
|
-
3. Mark tasks complete: `- [x] 1.1 Add role filter component`
|
|
159
|
-
4. Reference specs when making decisions
|
|
160
|
-
5. Update tasks.md if scope changes
|
|
161
|
-
|
|
162
|
-
## Step 4: Archive Completed Change
|
|
163
|
-
|
|
164
|
-
### With CLI
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
openspec archive add-profile-filters --yes
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Or ask AI:
|
|
171
|
-
|
|
172
|
-
```
|
|
173
|
-
Please archive the add-profile-filters change
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Without CLI
|
|
177
|
-
|
|
178
|
-
Manually merge the changes:
|
|
179
|
-
|
|
180
|
-
1. Copy spec deltas from `openspec/changes/add-profile-filters/specs/` to `openspec/specs/`
|
|
181
|
-
2. Apply ADDED/MODIFIED/REMOVED sections to source specs
|
|
182
|
-
3. Move change folder to archive: `openspec/archive/add-profile-filters/`
|
|
183
|
-
|
|
184
|
-
## Commands Reference
|
|
185
|
-
|
|
186
|
-
### With CLI
|
|
187
|
-
|
|
188
|
-
| Command | Action |
|
|
189
|
-
|---------|--------|
|
|
190
|
-
| `openspec init` | Initialize OpenSpec in project |
|
|
191
|
-
| `openspec list` | View active change folders |
|
|
192
|
-
| `openspec show <change>` | Display change details |
|
|
193
|
-
| `openspec validate <change>` | Check spec formatting |
|
|
194
|
-
| `openspec archive <change>` | Merge change into specs |
|
|
195
|
-
| `openspec update` | Refresh AI agent instructions |
|
|
196
|
-
|
|
197
|
-
### Without CLI
|
|
198
|
-
|
|
199
|
-
All operations are manual file operations. AI agents can create/edit files directly.
|
|
200
|
-
|
|
201
|
-
## Best Practices
|
|
202
|
-
|
|
203
|
-
1. **One Change Per Folder**: Keep changes focused and atomic
|
|
204
|
-
2. **Review Before Implementation**: Catch issues in specs, not code
|
|
205
|
-
3. **Update Tasks During Implementation**: Reflect actual work done
|
|
206
|
-
4. **Archive Promptly**: Keep changes/ folder clean
|
|
207
|
-
5. **Use Descriptive Names**: `add-2fa` not `feature-123`
|
|
208
|
-
|
|
209
|
-
## Next Steps
|
|
210
|
-
|
|
211
|
-
- See `spec-format.md` for specification syntax
|
|
212
|
-
- See `manual-setup.md` for CLI-free setup
|
|
213
|
-
- See `best-practices.md` for advanced patterns
|
|
214
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adr-validator.example.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/adr-validator.example.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,148 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adr-validator.example.js","sourceRoot":"","sources":["../../../src/utils/__tests__/adr-validator.example.ts"],"names":[],"mappings":";AAAA;;;GAGG;;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AC,CAAC;QAEH,mDAAmD;QACnD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,kEAAkE;AAClE,kCAAkC;AAClC,mCAAmC;AACnC,+BAA+B;AAC/B,iCAAiC;AACjC,qCAAqC;AACrC,8BAA8B;AAC9B,qCAAqC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;IAC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