# Seed Service Implementation This directory contains the seed service implementation for Story 1.9: "Seed System Reference Values & Rule Defaults". ## Implementation The seed service: 1. **Seeds Reference Values** - Operational status values - Service template defaults - Extension-layer reference values 2. **Configures Required-Field Rules** - Default readiness fields for election-cycle jobs - Evaluator-facing entity scope and FR29 readiness feature keys 3. **Sets Up Escalation Rule Defaults** - Default rules covering overdue milestone alert scenarios - FR30 compliance 4. **Ensures Idempotency** - Seed keys are stable idempotency boundaries - Existing records are not overwritten on rerun 5. **Maintains Separation** - Admin-managed values persist independently - Seed does not overwrite admin changes ## Files - `ISeedService.cs` - Interface defining seed service contract - `SeedService.cs` - Implementation of seed service - `ISeedDataStore.cs` - Store abstraction for reference values and rule defaults - `FileSeedDataStore.cs` - Durable JSON-backed store used by the application - `InMemorySeedDataStore.cs` - Test-friendly in-memory store with the same idempotency behavior - `SeedHostedService.cs` - Runs seeding during application startup ## Implementation Notes The current application does not yet have a relational extension database context, so Story 1.9 persists seed data through the same application-layer pattern used by earlier Epic 1 infrastructure: a DI-registered durable store. When a database context is introduced, `ISeedDataStore` is the replacement boundary.