# Feature Specification: Device Categories (Enrollment/Organization) (028) **Feature Branch**: `feat/028-device-categories` **Created**: 2026-01-04 **Status**: Draft **Priority**: P2 ## Context Device Categories are not a “policy”, but they are frequently needed for tenant rebuilds and enrollment flows. ## User Scenarios & Testing ### User Story 1 — Backup + restore Device Categories (Priority: P1) As an admin, when I create a backup set, Device Categories are captured as a foundation object and can be restored safely. **Acceptance Scenarios** 1. Given device categories exist, when I create a backup, then categories are included as foundation items. 2. Given a target tenant is missing categories, when I restore, then categories are recreated (idempotent by display name). ## Requirements ### Functional Requirements - **FR-001**: Add foundation type `deviceCategory` backed by `deviceManagement/deviceCategories`. - **FR-002**: Backup captures all categories with minimal metadata. - **FR-003**: Restore recreates categories idempotently (match by displayName) and records audit logs. - **FR-004**: Add targeted tests for foundation snapshot + restore. ## Success Criteria - **SC-001**: Device Categories are present in backups and can be recreated.