PRD: UX Debt Remediation — Client Portal
Status: Draft — Awaiting Approval
Version: 1.0
Author: Product Manager Agent
Date: 2026-04-22
Repo Scope: upsquad-ai/upsquad-client (UI surfaces only)
Audit Source: /tmp/ux-audit-client-portal.md (2026-04-22 — Director-of-Ops persona walk)
Pilot Stage: Slots between pilot acceptance and paid-MVP cutover
Changelog
- v1.0 (2026-04-22) — Initial draft. Translates the 2026-04-22 client-portal UX audit (1 P0 already remediated in part, 7 P1, 13 P2, 7 P3) into a structural remediation programme of five waves (U1–U5). Defines persona target, top-10 cross-cutting fixes, severity rubric, success metrics, and explicit boundaries against PRDs #553, #573, and #552.
1. Problem Statement
The UpsQuad client portal exposes backend primitives directly to end-users. Forms ask Directors and Team Leads for UUIDs, raw RBAC permission slugs, proto enum values, and JSON. Page copy uses internal jargon ("cascade", "sticky-deny", "org_unit", "Quad", "Pillar") with no glossary. RPC names leak through <ComingSoon> placeholders. Permission gates show integers (L3) instead of human labels.
The 2026-04-22 audit, conducted in the role of a Director of Operations, surfaced:
- 1 P0 —
/admin/guardrailsis unusable by non-engineers (raw policy form with UUID input, JSON conditions, integer clearance, RPC names in copy). The OnboardingOverlay dev-identity leak (a separate P0) has already been remediated via client#117/#123. The guardrails P0 itself is the anchor case for this PRD's Wave U1. - 7 P1 — sidebar,
/agents/[id],/approvals,/keys,/admin/roles,/admin/conflicts,/admin/org-units/[id], onboarding flow,/chatmock-data leak. - 13 P2 — dashboard, agents list, teams list, billing usage, audit,
/admin/import,/quad,/teams/structure,/settings/users, all<ComingSoon>admin pages (8 total), dev-tools exposure. - 7 P3 — minor polish on already-good pages (
/agents/deploy,/teams/[id]/budget,/billing/*,/workflows,/chat/[agent_id]).
The problem: the portal works for engineers who know the codebase. It does not work for the persona who will pay for it. This blocks paid-MVP cutover after pilot.
A handful of one-off bugs surfaced by the same audit have been filed and closed individually as client#118-122. This PRD is for the structural / cross-cutting remediation — translating backend primitives into domain language with sensible defaults, templates, wizards, pickers, and labels. It is not for one-off bug fixes, which continue to flow through the normal bug pipeline.
2. Goals & Success Metrics
Goals
- A non-engineer end-user can complete the top-10 portal flows without ever seeing a UUID, an enum slug, an integer clearance, an RPC name, or raw JSON.
- The portal's user-facing language matches the persona's mental model (teams, departments, rules, approvals — not org_units, pillars, policies, action_types).
- Every concept-heavy field has a tooltip or first-run explainer; the user does not have to leave the product to understand it.
- The portal is keyboard-navigable and screen-reader-accessible on the top-10 most-used pages.
- The portal renders cleanly on a narrow viewport (>= 375px) for the same top-10 pages.
Success Metrics (binary, measurable, post-Wave-U5)
| Metric | Target | How verified |
|---|---|---|
| UUIDs visible to non-engineers in any form field | 0 | Static lint: placeholder="UUID" count = 0; manual walk |
Raw enum strings (action_type, scope=org_unit, requires_approval literal) shown to user | 0 | Manual walk + grep for known enum literals in JSX |
RPC / service names in user-facing copy (e.g. TenantService, GovernanceService.ConfigureApprovalPolicy) | 0 | Grep <ComingSoon service="..."> and any Service\b in JSX text |
| Time to create first guardrail rule (cold-start, non-engineer persona) | < 2 min | Stopwatch run on persona script |
| Top-10 user flows pass keyboard-only navigation | 100% | Playwright keyboard-only suite |
| Top-10 user flows pass screen-reader smoke (axe-core: 0 critical, 0 serious) | 100% | axe-core in Playwright |
| Top-10 user flows render correctly at 375px viewport | 100% | Playwright responsive snapshot |
clearance-labels.ts adoption coverage (% of clearance display sites) | 100% | grep audit |
Non-Goals
- No backend behavioural changes. This PRD only translates existing RPCs into better UI. If a backend RPC requires a UUID input, the UI takes a picker and resolves it to UUID before calling.
- No new product features. Debt only.
- No security-model changes. Clearance levels, RBAC permissions, scope hierarchy stay as-is. Only their presentation changes.
- No admin portal scope.
upsquad-admin(admin#2) has its own PRD. - No pricing / billing UX changes. PRD #552 owns billing scope.
- No dashboard intelligence redesign. PRD #553 owns dashboard scope; this PRD only handles the id-resolution and clearance-label hygiene leaking into the dashboard today.
- No Quad chat infrastructure changes. PRD #573 (HLD #915) owns Quad. This PRD coordinates the rename "Quad → Copilot" with W8 of that HLD.
3. Persona Target
Primary persona: Non-engineer end-user. Examples: Director of Operations, Team Lead, Head of People, Finance Manager. Same persona that gated PRD #950 walks.
Persona profile:
- Comfortable with computers and SaaS dashboards (Notion, Linear, Workday, Salesforce).
- Has never read a backend service spec.
- Does not know what a UUID, JSON, RBAC, RPC, or proto enum is. May know "JSON" exists but cannot author it.
- Mental model is in domain language: my team, my department, my approvers, my rules, my agents.
- Will close the tab if the form asks them to type a UUID or paste JSON.
Persona quote (from audit):
"As a Director of Operations, when I opened Guardrails to tell my agents they can't send customer emails without my approval, I was shown a form that asked me for a UUID, an
action_typeslug, a number between 1 and 5 with no scale key, and a JSON object. I closed the tab, opened Linear, and filed a ticket asking 'can we just not give any of my team AI agents yet?'."
Secondary persona: Tech-literate admin (DevOps engineer, IT lead). They are happy with raw forms but should not be the only audience that can use the product. They retain access to JSON / advanced views via "Advanced" disclosures, so power-user workflow is preserved.
4. Top-10 Cross-Cutting Fixes (Canonical)
The audit surfaced ten cross-cutting fixes that, taken together, resolve roughly 80% of the friction. Each fix has at least one anchor finding in the audit.
| # | Fix | Touches | Wave |
|---|---|---|---|
| F1 | Replace /admin/guardrails raw policy form with a plain-English wizard ("Block what / for which team / do what / with approval from whom / when"). Hide raw JSON / Advanced fields behind disclosure. Template gallery for first-use. | /admin/guardrails, DryRunPanel | U1 |
| F2 | Eliminate UUIDs from every form field a non-engineer touches. Replace with member, team, unit, and tool pickers. | /admin/guardrails, /agents/[id], /admin/conflicts, /admin/import, /approvals filter, agent dry-run | U3 |
| F3 | Adopt clearance-labels.ts (L1..L5 → Standard / Internal / Sensitive / Privileged / Executive) at every clearance display site. Module exists; partially used. | /admin/guardrails, /admin/import, /teams/[id]/tools, /dashboard approvals list | U2 |
| F4 | Rename user-facing jargon: "Quad" → Copilot (coordinated with PRD #573 W8); "Cascade" / "sticky-deny" → remove; "action_type / target / effect" → plain English; "Org Unit" → Team / Department; "Pillar" → Division / Department; "Conflicts" → Rule Conflicts; "tokens" → add "≈ X pages" co-label. | Sidebar, /quad, /admin/conflicts, /admin/guardrails, /admin/org-units/[id], /teams, /billing/usage | U2 |
| F5 | Add global ⌘K spotlight search across the portal (cmdk library). 40+ pages, no global jump today. | src/components/layout/*, all routes | U4 |
| F6 | Hide raw JSON fields behind "Advanced" disclosure. Default render is structured / human. | /admin/guardrails (conditions), /admin/conflicts (suggested merge), /admin/import (field mapping) | U1, U3 |
| F7 | Resolve every id.slice(0, N) label to a real name. Fall back to "Unnamed agent" / "Pending approval" — never a UUID prefix. | /dashboard approvals, /agents list, /teams list, /admin/conflicts/[id], notified-parties list | U3 |
| F8 | Audit and kill every remaining <ComingSoon> page that leaks an RPC name. (client#124 cleaned 9 call sites; verify residue and finish.) | /admin/org, /admin/users, /admin/teams, /admin/approvals, /admin/metrics, /workflows, /settings, /settings/organization, plus any introduced since | U2 |
| F9 | Tooltip / first-run explainer layer on every concept-heavy field (clearance, scope, target, conditions, status, autonomy). User shouldn't have to Google. Standard tooltip primitive + ? icon convention. | All pages with concept-heavy fields | U4 |
| F10 | Mobile / narrow-viewport rendering pass on the top-10 most-used pages. >= 375px viewport, no horizontal scroll, tap targets >= 44px. | Top-10 pages by usage | U5 |
Top-10 most-used pages (for F10 scope): /dashboard, /agents, /agents/[id], /approvals, /quad (or renamed Copilot), /chat, /teams, /teams/[id]/tools, /billing/usage, /audit. Final list confirmed against analytics during U5 kickoff.
5. Audit Residue (P1 / P2 / P3 carried into LLD tasks)
Every P1/P2/P3 finding in the audit not directly resolved by the top-10 fixes becomes an LLD task under the appropriate wave. Non-exhaustive list — the architect's HLD will enumerate fully:
P1 (must close before paid-MVP)
- Sidebar: rename sections to user mental models, hide ComingSoon items, fix hardcoded
badge: 3, replaceBE/FE/QA/ARagent monograms with tenant-data, add cmd-K. (U2 + U4) /agents/[id]: replace UUID inputs for Supervisor + Org Unit with pickers; rewriteErrorState.detailto plain English; drop "Agent ID: {uuid}" from chat header. (U3)/approvals: move "Session ID" filter behind Advanced; tooltip every status; add "My queue" tab. (U2 + U4)/keys: rewrite "programmatic access" copy; empty-state guidance; show example cURL after creation. (U2)/admin/roles: auto-generate slug; show permission categories not slug list; describe each built-in role; renameagents.register→ "Hire new agents" style. (U2)/admin/conflicts: rename "Conflicts" → "Rule Conflicts"; replace winning/losing layer with English narrative; hide JSON; replace UUID filters with pickers; simplify action buttons to a 2-option radio. (U2 + U3)/admin/org-units/[id]: rename "Org unit" to actual type; hide UUID from subtitle; rename "Effective tools"; rename "Numeric ceiling". (U2)- Onboarding flow: surface org-creation errors with retry CTA; "Skip" should actually skip; add progress indicator. (U2)
/chat: replace hardcodedMOCK_AGENTS(UpsQuad internal team names) withuseAgents(); drop "Agent ID" UUID; replace slash-command approvals with buttons. (U2 + U3)
P2 (close before paid GA)
/dashboard: id-to-name resolution for approvals + agent grid; clearance label adoption; first-time onboarding tile. (U3 + U2)/agents: resolveteamId→ team name; add Status / Last active / Owner columns; filters bar; first-use empty state. (U3)/teams: rename "Pillar" → "Department"; resolve ID → name; clickable rows; "Create team" CTA. (U2 + U3)/teams/[id]/tools: risk labels need icons not just colour; swapL{n}forclearanceLabel(); pretty-print approver_role slugs. (U2)/audit: subhead rewrite;actionTypefilter as human dropdown; export-to-CSV. (U2)/billing/usage: tokens → "≈ X pages"; tooltips on every metric; hide mock breakdowns until real data lands. (U2)/admin/import: rename "SCIM endpoint" → "Connect to your directory"; dropdown picker for field mapping in simple mode; remove TODO comments from JSX; clearance-label adoption. (U2)/quad: first-visit tour ("Hi! I'm Copilot, your org assistant."); more suggestion chips with "See all" gallery; empty-workspace hint. (U2 + U4)/teams/structure: rename sidebar item "Agent Structure" to "Org Chart"; align with page title. (U2)/settings/users: add single-user invite dialog; tooltips on filter values; split Members vs Agents. (U2 + U4)- Dev-tools exposure hardening: Playwright assertion that test buttons / clearance switcher are absent without
NEXT_PUBLIC_DEV_TOOLS. (U2)
P3 (nice-to-have)
/agents/deploy: surface deploy errors via toast; success celebration with "chat with new agent" CTA. (U2)/teams/[id]/budget: hide UUID from breadcrumb when team name not yet loaded. (U3)/billing+/billing/plans+/billing/invoices: minor copy polish (whitelist tier names). (U2)/workflows+/workflows/[workflow_id]: resolves with the central ComingSoon refactor (F8). (U2)/chat/[agent_id]: drop "Agent ID" header line. (U3)
6. Wave Plan
Each wave is independently shippable, ordered by user-facing impact. Each wave is gated by an architect HLD review and a PM product-acceptance review against the success metrics it targets.
Wave U1 — Guardrails Wizard (the largest single user-facing win)
Why first: the audit's only P0 page; the single most cited blocker for paid MVP. The current page is unusable by the target persona.
Scope:
- Replace
/admin/guardrailspolicy editor with a 5-step plain-English wizard: (1) what to control, (2) which team, (3) what should happen, (4) approval routing, (5) when it applies. - Tile-based step 1 with starter categories (Money / Billing, Customer data, Code & deployments, External tools, Everything high-risk).
- Team picker (tree) replacing
unitIdUUID input. - Effect radio with English labels ("Always block", "Pause and ask a human", "Allow freely") replacing
allow / deny / requires_approvalenum. - Clearance label rendering (Standard / Internal / Sensitive / Privileged / Executive) replacing
min_clearanceinteger. - Conditions: chip selector (Always, Outside business hours, Over a dollar threshold) with "Advanced (JSON)" disclosure.
- DryRunPanel: default caller to "me", default action to a recent action from the user's audit log; show verdict as a sentence ("This rule would have blocked 3 actions in the last 7 days").
- Cascade explanation replaced with a stacked-block visualisation.
- Template gallery for first-use empty state (6 starter templates).
- Remove all TODO comments and RPC names from page copy.
Estimate: ~3 weeks (architect HLD + frontend implementation + UX iterations). Depends on: picker primitives from U3 may be reused; for U1 we ship a guardrails-only inline picker and refactor in U3 if needed. Acceptance: non-engineer creates first rule in < 2 min; zero UUIDs / enum strings / RPC names visible.
Wave U2 — Jargon Rename + Clearance Labels + ComingSoon Cleanup
Why second: mostly mechanical, cross-cutting, visible on every page. Highest-leverage low-effort wave. Coordinates with PRD #573 W8 for "Quad → Copilot".
Scope:
- F3:
clearance-labels.tsadoption everywhere. - F4: jargon rename pass — "Quad" → "Copilot" (coordinate with PRD #573 W8), "Conflicts" → "Rule Conflicts", "Org Unit" → "Team" or "Department" by context, "Pillar" → "Division" or "Department", "Cascade" / "sticky-deny" removed from copy, "action_type / target / effect" mapped to English, tokens → "≈ X pages".
- F8: finish the
<ComingSoon>cleanup — refactor the component to drop theserviceprop from display; hide nav items pointing to non-functional pages. - Sidebar polish: section renames, hide ComingSoon items, fix hardcoded
badge: 3, replaceBE/FE/QA/ARagent monograms. - All P1/P2 copy fixes from the audit residue list.
Estimate: ~1.5 weeks.
Depends on: PRD #573 W8 schedule for the rename. If #573 is in flight, coordinate naming strings; if not, U2 ships the rename first and #573 inherits.
Acceptance: zero raw enum strings, zero RPC names, full clearance-label coverage, zero <ComingSoon service="..."> leaks.
Wave U3 — UUID → Picker Migration + ID-to-Name Resolution
Why third: the second-largest user-facing win. Each picker is a small reusable component; many call sites.
Scope:
- F2: ship four reusable pickers —
<MemberPicker>,<TeamPicker>,<UnitPicker>,<ToolPicker>. Tree / typeahead / category-grouped variants. - Migrate all UUID input fields to pickers:
/agents/[id](Supervisor + Org Unit),/admin/conflictsfilters (member_id),/approvals(Session ID filter behind Advanced + replaced by member picker for primary use),/admin/importfield-mapping pickers, dry-run caller picker. - F7: resolve every
id.slice(0, N)label to a real name. Fallbacks are "Unnamed agent" / "Pending approval", never UUID prefix. Affected:/dashboardapprovals + agent grid,/agentsteam column,/teamspillar column,/admin/conflicts/[id]policies, notified-parties. - Hide JSON conditions on
/admin/conflicts/[id]"Suggested merge" behind "View technical details"; default render is before/after rule comparison.
Estimate: ~3 weeks.
Depends on: U1 (picker primitives may originate in U1's guardrails wizard and graduate here).
Acceptance: zero placeholder="UUID" in codebase; zero id.slice(0, N) in JSX text.
Wave U4 — ⌘K Spotlight + Tooltip Layer + First-Run Explainers
Why fourth: quality-of-life multiplier. Adds discoverability across the now-cleaned-up portal.
Scope:
- F5: ⌘K spotlight via
cmdk. Indexes pages, agents, teams, recent approvals, settings, help articles. - F9: tooltip primitive +
?icon convention. Apply to: clearance labels, scope, target, conditions, status, autonomy levels, every approval status, every risk label. - First-run explainers:
/quad(renamed Copilot) tour card; sidebar tooltips on every nav item; "what this role lets someone do" descriptions on/admin/roles. - "My queue" tab on
/approvals.
Estimate: ~2 weeks. Depends on: U2 (renames must land first so tooltip copy is consistent). Acceptance: every concept-heavy field has discoverable explanation; cmd-K reaches every page in the portal in <= 2 keystrokes after open.