# Tasks: Policy Sets (Intune native bundling) (025)

**Branch**: `feat/025-policy-sets`  
**Date**: 2026-01-04  
**Input**: [spec.md](./spec.md), [plan.md](./plan.md)

## Phase 1: Setup
- [x] T001 Create spec/plan/tasks and checklist.

## Phase 2: Research & Design
- [ ] T002 Confirm Graph resource + `@odata.type` for Policy Sets.
- [ ] T003 Confirm item subresource shape (`/items`) and how referenced objects are represented.
- [ ] T004 Confirm assignment endpoints (`/assignments`) and payload shape.
- [ ] T005 Define restore preview “linking report” rules and execution gating.

## Phase 3: Tests (TDD)
- [ ] T006 Add sync test importing Policy Sets.
- [ ] T007 Add snapshot test capturing items (and assignments).
- [ ] T008 Add restore preview test showing linking report (missing vs resolvable).

## Phase 4: Implementation
- [ ] T009 Add `policySet` to `config/tenantpilot.php`.
- [ ] T010 Add contract entry in `config/graph_contracts.php` (resource + item hydration + assignments).
- [ ] T011 Implement snapshot hydration for `items` and assignment capture.
- [ ] T012 Implement restore preview linking report and safe gating.
- [ ] T013 Add a normalizer for readable UI output (items summary + assignment summary).

## Phase 5: Verification
- [ ] T014 Run targeted tests.
- [ ] T015 Run Pint (`./vendor/bin/pint --dirty`).

