Patient Visit Advocate plan
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
plan · supabase_json

Patient Visit Advocate plan

plan artifact · for Patient Visit Advocate · status approved

Planning Surface

Use this to decide what happens next.

Status

approved

open questions
idownerblocksstatusquestionmy default
OQ-01justin- M-01.T2openShould PVA be a new standalone Next.js app (apps/pva/) or a new route section within an existing app?New standalone app: apps/pva/, mirrors kv-app structure.
OQ-02justin- M-01.T3openAuth pattern: Supabase Auth + pva_reviewer_roles table, or existing platform pattern?Supabase Auth + pva_reviewer_roles table (per DB migration M-01.T1).
OQ-03justin- M-01.T3openSingle Internal Reviewer role or Reviewer + Viewer distinction? (Zara OQ-01)Single reviewer role with full approve/reject. No viewer tier in SLICE-01.
Agent Handoff
Start Here

plan artifact · for Patient Visit Advocate · status approved

Completion Evidence

No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.

Open Questions
  • OQ-01: id: string, owner: string, blocks: object, status: string, question: string, my_default: string
  • OQ-02: id: string, owner: string, blocks: object, status: string, question: string, my_default: string
  • OQ-03: id: string, owner: string, blocks: object, status: string, question: string, my_default: string
Structured Payload

Machine-readable source fields

git
repo url

https://github.com/justinb2bea/RedK3y.git

pr policy

required

merge policy

manual

branch prefix

feature/pva-slice-01

commit policy

required

worktree root

/opt/redk3y

default base branch

main

clean workspace required

false

gates
idnametypedepends onreturn pathblocks dispatch
GATE-001Exec Plan Approvalexec- PLAN.json draftpriya — revise PLAN.json based on Justin's notestrue
GATE-002Publish-Blocked Safety Checkreviewer- M-02.T3vikram — remove publish_ready assignment and resubmitfalse
modules
idgoalnameriskstasksstatus
M-00Justin reviews and approves this PLAN.json before any implementation tasks are dispatched.Exec Gate — Plan Review- RISK-M00-001: OQ-01 (app location) override would require rework of M-01 APP-001 task.- Exec Plan Review — PVA-SLICE-01: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: objectpending
M-01Create the Supabase migration for all qna tables, scaffold the PVA Next.js app, and implement reviewer auth middleware.Foundation — DB Schema + App Scaffold + Auth- RISK-M01-001: OQ-01 override (app location) invalidates APP-001 task.- Supabase migration — qna tables schema: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: object - Scaffold PVA Next.js app at apps/pva/: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: object - Reviewer auth middleware and role gate: git: object, role: string, brief: string, title: string, pending
M-02Implement all Next.js Route Handlers for batch list/detail, item list with filters, item detail, and review actions.API Layer — Batch, Item, and Review Endpoints- RISK-M02-001: If publish_status update is accidentally permitted in the review POST handler, content could incorrectly become publish_ready.- API — batch list and batch summary endpoints: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: object - API — item list with filter, search, sort, pagination: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: object - API — item detail and review action endpoints: git: object, role: string, bpending
M-03Implement design tokens in Tailwind and all base UI components (C-01 through C-04, C-07, C-08).UI Foundation — Tokens + Base Components- RISK-M03-001: color-status-clear (#8DC63F) on white text fails WCAG contrast — must use dark text.- Design tokens — Tailwind config + CSS custom properties: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: object - Base UI components — C-01 Table, C-02 Sidebar, C-03 Filter Bar, C-04 Status Badge, C-07 Error Banner, C-08 Tooltip: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: objectpending
M-04Implement C-05 Lint Findings Panel and C-06 Reviewer Action Controls with publish-blocked gate enforcement.Review Components — Lint Findings + Reviewer Actions- RISK-M04-001: A developer adds a Publish button to C-06 contrary to spec.- Review components — C-05 Lint Findings Panel and C-06 Reviewer Action Controls: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: objectpending
M-05Implement all 4 review console surfaces wired to live API data.Surfaces — S-01 through S-04- RISK-M05-001: S-03 drawer may reload full page instead of updating in-place after review action.- S-01 Batch List screen: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: object - S-02 Item List screen with filter bar: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: object - S-03 Item Detail Drawer: git: object, role: string, brief: string, title: string, output: object, dispatch: objecpending
M-06Implement all responsive breakpoints (desktop/tablet/mobile) and complete WCAG 2.1 AA accessibility audit.Responsive Layout + Accessibility Pass- Responsive layout and full accessibility pass: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: objectpending
M-07Full reviewer pass on all PVA-SLICE-01 implementation against UX spec and PLAN.json acceptance criteria.Code + Spec Compliance Review- Final code and spec compliance review — PVA-SLICE-01: git: object, role: string, brief: string, title: string, output: object, dispatch: object, local_id: string, acceptance: object, agent_hint: string, depends_on: object, hard_stops: object, files_owned: objectpending
project
id

pva

name

Patient Visit Advocate — PVA-SLICE-01

status

draft

deadline

No value captured.

client id

dreamborn

source artifacts
decomp

No value captured.

intent

No value captured.

policy

No value captured.

ux spec

studio/pva/PVA-SLICE-01/internal-review-console-ux.md

research

No value captured.

architecture

No value captured.

requirements

tasks/0.0.8889976/output.md

intake triage

No value captured.

coherence review

No value captured.

dev studio
views
  • summary
  • module_board
  • dependency_graph
  • task_table
  • gates
  • risks
  • open_questions
  • completion_contracts
render as

project_plan

open questions
idownerblocksstatusquestionmy default
OQ-01justin- M-01.T2openShould PVA be a new standalone Next.js app (apps/pva/) or a new route section within an existing app?New standalone app: apps/pva/, mirrors kv-app structure.
OQ-02justin- M-01.T3openAuth pattern: Supabase Auth + pva_reviewer_roles table, or existing platform pattern?Supabase Auth + pva_reviewer_roles table (per DB migration M-01.T1).
OQ-03justin- M-01.T3openSingle Internal Reviewer role or Reviewer + Viewer distinction? (Zara OQ-01)Single reviewer role with full approve/reject. No viewer tier in SLICE-01.
schema version

1.0

dependency graph
root tasks
  • M-00.T1
critical path
  • M-00.T1
  • M-01.T1+T2 (parallel)
  • M-01.T3
  • M-02.T1+T2+T3 (parallel)
  • M-03.T1
  • M-03.T2
  • M-04.T1
  • M-05.T1+T2+T3+T4 (parallel)
  • M-06.T1
  • M-07.T1
terminal tasks
  • M-07.T1
parallel groups
idgatetasks
foundationM-01.T3- M-01.T1 - M-01.T2
api- M-02.T1 - M-02.T2 - M-02.T3
surfaces- M-05.T1 - M-05.T2 - M-05.T3 - M-05.T4
planning summary
goal

Build PVA-SLICE-01: a fully functional internal-only Q&A review console. Internal reviewers can inspect import batches, view lint findings, approve or reject individual Q&A items, and add notes. All content remains publish-blocked. Stack: Next.js 14 (App Router) / React 18 / TypeScript / Supabase (Auth + Postgres) / Tailwind CSS / Zod.

must show
  • S-01 Batch List renders qna_import_batches with aggregate lint/review/publish status counts.
  • S-02 Item List supports filter by lint_status, review_status, cluster, category, wave, and free-text search.
  • S-03 Item Detail Drawer shows full Q&A content, lint findings, provenance, and review history.
  • S-04 Batch Summary shows stats, checksum, and publish gate status.
  • publish_status is ALWAYS 'publish_blocked' — no publish action exists anywhere in this slice.
  • Approve is blocked (server 422 + client aria-disabled) when lint_status = 'lint_flagged'.
  • Reject action requires a note (min 10 chars, server-enforced).
  • All surfaces require authenticated internal reviewer (Supabase Auth + pva_reviewer_roles).
  • WCAG 2.1 AA across all surfaces. Full keyboard navigation. prefers-reduced-motion respected.
out of scope
  • Q&A import tool or dry-run importer (SLICE-01 is review-only).
  • Patient-facing Q&A library or search.
  • Any publish action making content publicly visible.
  • AI-generated answers or Q&A generation controls.
  • Caregiver/family plan surfaces.
  • Legal launch approval workflow.
  • Viewer role (read-only tier) — single reviewer role only in this slice.
  • Batch delete or archive actions.
global hard stops
  • If publish_status = 'publish_ready' appears anywhere in codebase — stop and escalate.
  • If auth gate is client-side only — block implementation of any data-bearing surface.
  • If OQ-01 (app location) or OQ-02 (auth pattern) are overridden by Justin — re-plan M-01 before dispatching.
  • If color contrast for status tokens fails WCAG 4.5:1 — correct tokens before UI-008 completes.
global constraints
  • New standalone Next.js 14 app at apps/pva/ — mirrors kv-app structure. ASSUMPTION: Justin may override to existing app.
  • Auth: Supabase Auth + pva_reviewer_roles table. ASSUMPTION: Justin may override auth pattern.
  • Single 'reviewer' role — no viewer tier. ASSUMPTION pending Justin confirmation on OQ-03.
  • All API business rules enforced server-side — not only client-side.
  • No implementation dispatch before M-00 exec gate approval.
  • No gradient text. No side-stripe border decorations. Design bans enforced.