# Implementation Plan

## Steps

1. Load relevant frontend, backend, and shared Trellis specs.
2. Add schema enums/tables and update core permission types/seed role definitions.
3. Generate the Drizzle migration.
4. Add module type contracts, validators, and server operations for devices, notices, alerts, and family.
5. Add API route handlers and route tests for read/manage permission behavior and organization scoping.
6. Add local seed records for the four modules using existing organization, elder, bed, incident, health, and account context where available.
7. Replace reserved route pages with data-backed Server Components and client workspace components.
8. Run `pnpm type-check`, `pnpm test`, and targeted lint/build checks as time allows.
9. Run Trellis check/update-spec finish steps and commit task changes.

## Validation Commands

- `pnpm db:generate`
- `pnpm type-check`
- `pnpm test`
- `pnpm lint`

## Risk Points

- Schema migration generation changes tracked Drizzle metadata; inspect before finalizing.
- Avoid touching unrelated user-modified files except where required by shared types/navigation/seed integration.
- Keep organization scoping explicit in every list and mutation query.
