Files
teatea-pension/.trellis/tasks/07-08-complete-ops-ai-board/implement.md

1.5 KiB

Implementation Plan

1. Planning and Context

  • Read Trellis workflow context and relevant backend/frontend/shared specs.
  • Inspect existing collaboration modules, dashboard page/component, AI analysis service, permissions, and seed data.
  • Persist PRD, design, implementation plan, and curated spec manifests.

2. Seeding

  • Extract idempotent collaboration seed helper from the full-workspace seed path.
  • Call the helper for both existing core workspaces and newly seeded workspaces.
  • Preserve existing operator rows and insert only missing default records.

3. AI Analysis Board

  • Add an organization-scoped AI board listing function that joins elder names and redacts restricted analysis rows.
  • Add serializable dashboard board item types.
  • Keep existing elder-specific analysis APIs unchanged.

4. Dashboard Integration

  • Expand dashboard permission gate to collaboration and AI read permissions.
  • Conditionally load devices, notices, alerts, family, and AI board data by permission.
  • Render collaboration cards and AI analysis board from persisted data only.
  • Preserve slug-aware links via getWorkspaceHref.

5. Verification

  • Add focused tests for collaboration seed idempotency and AI board redaction.
  • Run focused tests covering changed code.
  • Run pnpm type-check.
  • Smoke-test the dashboard route when feasible via pnpm build route compilation.
  • Add latency controls for AI provider timeout, token cap, retry count, and sanitized timeout failure history.