Are you an LLM? You can read better optimized documentation at /dig-your-windows/en-US/openspec.md for this page in Markdown format
OpenSpec Specification
DigYourWindows follows Spec-Driven Development (SDD) methodology, where all features are defined before coding.
What is OpenSpec?
OpenSpec is a specification-driven development approach with core principles:
- Specification First - Every feature must have a clear specification definition
- Acceptance Driven - Use Given/When/Then format for acceptance criteria
- Single Responsibility - Each spec describes only one domain
Specification Structure
openspec/specs/
├── architecture/ # Architecture design decisions
├── data/ # Data models and validation
├── export/ # Report export API
├── features/ # Product feature acceptance criteria
├── hardware/ # Hardware monitoring thresholds
├── testing/ # Testing strategy
└── workflow/ # Development workflow1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Domain Specifications
Architecture Specification
Defines system architecture design decisions:
- Layered architecture design
- Service boundary definition
- Dependency injection configuration
Data Specification
Defines data models and validation rules:
DiagnosticDatamodel structure- Data validation rules
- JSON serialization configuration
Features Specification
Uses Gherkin format for feature acceptance criteria:
gherkin
Feature: System Health Scoring
As a user
I want to get a system health score
So that I can understand the overall system status
Scenario: Normal system scoring
Given the system is running normally
When the user requests a health score
Then a score of 70-100 should be returned
And detailed subscores should be displayed1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Hardware Specification
Defines hardware monitoring thresholds:
| Metric | Normal Range | Warning | Critical |
|---|---|---|---|
| CPU Temp | < 70°C | 70-85°C | > 85°C |
| GPU Temp | < 75°C | 75-90°C | > 90°C |
| Memory Usage | < 70% | 70-85% | > 85% |
| Disk Usage | < 80% | 80-90% | > 90% |
Testing Specification
Defines testing strategy:
- Unit test coverage requirement: ≥ 80%
- Property-based testing with FsCheck
- CI/CD integration testing
Workflow
Specification Value
- Communication Tool - Team members share a unified understanding
- Documentation as Code - Specs update with code changes
- Traceability - Every feature has a clear source and goal