Commit Graph

3 Commits

Author SHA1 Message Date
dd3a4f3d97 feat: implement services layer with TDD (Milestone 2)
Implemented all core services following strict TDD (RED-GREEN-REFACTOR):

**Services Implemented:**
- EstimateService: Generate estimates with intensity-based range selection
- StorageService: SQLite persistence with auto-pruning
- ShakeDetectionService: Accelerometer-based shake detection

**Features:**
- Cryptographically secure RNG for estimate selection
- Easter egg logic (>15s shake → Humorous mode)
- Intensity-based range calculation (0-0.3: 20%, 0.3-0.7: 50%, 0.7+: 100%)
- SQLite with auto-pruning based on MaxHistorySize
- Shake detection with 1.5g threshold
- Duration tracking and intensity normalization (0.0-1.0)
- Event-based notifications (ShakeDataChanged)

**Tests:**
- EstimateService: 25 tests (RED-GREEN-REFACTOR)
- StorageService: 14 tests (RED-GREEN-REFACTOR)
- ShakeDetectionService: 22 tests (RED-GREEN-REFACTOR)
- Integration tests: 10 tests
- Total: 119 tests, all passing

**Quality:**
- Build: 0 warnings, 0 errors across all platforms
- Coverage: 51.28% line (low due to MAUI template), 87.5% branch
- All service/model code has high coverage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 12:37:20 +02:00
83ec08f14b feat: project setup and core models with TDD
MILESTONE 1 COMPLETE:

Project Setup:
- Create .NET 8 MAUI solution targeting iOS, macOS, and web
- Configure nullable reference types and warnings as errors
- Add required dependencies (MAUI 8.0.3, SQLite, CommunityToolkit.Mvvm)
- Add testing dependencies (xUnit, NSubstitute, FluentAssertions, Coverlet)
- Create comprehensive .editorconfig with C# coding standards
- Update CLAUDE.md with development commands

Core Models (TDD - 48 tests, all passing):
- EstimateMode enum (Work, Generic, Humorous modes)
- EstimateResult model with validation (intensity 0.0-1.0, non-null text)
- ShakeData model with intensity validation
- AppSettings model with defaults (Work mode, max history 10)

Build Status:
- All platforms build successfully (net8.0, iOS, macOS)
- 0 warnings, 0 errors
- Test coverage: 51.28% line, 87.5% branch (models have ~100% coverage)

Per spec: Strict TDD followed (RED-GREEN-REFACTOR), models fully validated

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 12:12:36 +02:00
17df545fba Add initial project design and specification documents
- Add comprehensive design document with validated architecture
- Add formal specification with RFC 2119 requirements language
- Include MVVM architecture, testing strategy, and platform requirements
- Define shake detection algorithm and estimate generation logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 01:21:38 +02:00