Scopes this plan's immediate implementation target to Setup + User
Stories 0-3 (sign-in, agent dashboard, ticket workbench, support-org
admin) - the P1 MVP - given the feature's overall size (8 user stories
against a fully empty lib/api, lib/auth, lib/query, and empty test
configs). Key decisions: session token in a plain cookie (readable by
both Next.js middleware and client-side axios, since supporthub-api only
reads a Bearer header, never a cookie), middleware does a cheap
unverified presence/role check for UX redirects only - the real gate
stays supporthub-api's own token verification - and lib/api is the one
typed client layer per Constitution Principle IV.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
supporthub-api's 010-identity-auth (built after this spec's initial approval)
established that agent/admin login is supporthub-api's own authentication,
never SaaS-delegated — this spec and the project constitution's Principle I
still assumed the opposite. Adds User Story 0 (sign-in, P1) and FR-000/SC-006
for the login screen and session-guard this frontend must now own, and
rewords FR-011/the affected Edge Case to reference the supporthub-api
session role instead of a "SaaS-provided role." Only end-customer identity
remains SaaS-delegated.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Scopes supporthub-api's Phase 10 roadmap line ("Agent workspace...
admin configuration surfaces for every configurable subsystem above")
into this project's own first feature: the agent ticket workbench and
problem-resolution workflow, plus admin configuration for support
organization, SLA/business-calendars, and escalation -- the subsystems
an agent's own day-to-day work most directly depends on.
Deliberately defers the (public)/(customer) portals, real-time push
sync, analytics/reporting, audit-log viewing, platform settings, and
AI-confidence-policy administration to a follow-up feature, each
flagged explicitly in Assumptions.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bootstraps GitHub Spec Kit (scripts, templates, workflow, speckit-*
skills) for this frontend project, mirroring the spec-driven workflow
already used in supporthub-api. Ratifies seven founding principles:
SaaS as the sole identity/access authority, the backend as the sole
source of business logic, strict portal boundaries ((public)/(customer)/
(support)/(admin)), a single typed API client layer (no ad hoc fetching),
configuration over hardcoding for anything the backend exposes as
admin-configurable, an accessible/responsive baseline for an
enterprise all-day tool, and required unit/integration/E2E testing
gates.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>