Context. surface customer · domain arete · route /domains/arete/plan-review · auth signed-in · source apps/oshun/web/src/app/domains/arete/plan-review/page.tsx
Last walked. 2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified; live screen-reader, touch, offline, and telemetry-delivery checks pending a manual AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md
Purpose#
Internal /domains/arete/* plan-review workspace. A heavy multi-region view
tying together goals, routines, friction logs, reflection prompts, decision
tracking, progress signals, pattern dimensions, continuity cards, Tara
suggestions, accountability flows, and an artifact action panel. Backed by
@oshun/domain-arete canonical builders and policies; uses localStorage for
artifact persistence.
Entry points#
- Direct URL / bookmark — yes (signed-in):
/domains/arete/plan-review - Arete shell route — yes:
/domains/arete?origin=home&path=%2Fplan-reviewhydrates the internal workspace for a pro-entitled account;/domains/aretealso exposes thePlan & Reviewnav item - Back navigation — dedicated page passes
onBack={() => router.back()}; shell route passesgoHome, returning in-place to the Arete shell home
Layout regions#
page.tsx is a 'use client' page using useRouter(). Renders
<AretePlanReviewWorkspace onBack={() => router.back()} />. Component at
apps/oshun/web/src/components/domains/arete/AretePlanReviewWorkspace.tsx.
The workspace is large (~2940 lines) and assembles many sub-regions. From state declarations in the main component:
- Review window:
weekly/quarterly(ReviewWindow) - Selected goal: one of
goals(fixture array ofGoalWorkspaceModel) - Selected routine: one of
routines(fixture array ofRoutineWorkspaceModel) - Selected reflection prompt: one of
reflectionPrompts(ReviewReflectionPrompt) - Reflection draft: free-form string with
reflectionDraft/reflectionCapturedAt/shareReflectionConsent/exportReflectionConsent - Decision statuses:
Record<decisionId, AreteReviewDecisionStatus>for each review's decisions (initialised from the canonical reviews) - Completed anchors:
Set<routineId>tracking which routine anchor steps have been ticked
Computed regions surfaced in the layout (per source):
- Coaching shell:
buildAreteCoachingSummaryShellModel({ summary: ... }) - Routine evaluations: per-routine
evaluateAreteRoutineCompletionresults - Decision counts:
{ accepted, deferred, discarded } - Tara suggestions:
buildAretePlanReviewTaraSuggestions - Assistant accountability flows:
buildAreteAssistantAccountabilityFlows - Progress map signals:
buildProgressMapSignals - Pattern dimensions:
buildPatternDimensions - Continuity cards: 3 cards (Next practice / Weekly review thread / Reflection thread)
- Artifact action gates: per-action gates from
resolveAreteArtifactActionGatefor save / share / export, gated on privacy level and consent flags - Artifact governance summary: human-readable strings of each gate's status + reason
States#
- Loading — N/A: client component with sync canonical builders; saved-at
hydrated via
useEffectagainstreadSavedAreteArtifact - Window toggled (weekly ↔ quarterly) — re-derives
activeReview, coaching shell, decision counts, Tara suggestions, accountability flows, progress map signals, pattern dimensions - Reflection draft contains text —
reviewContainsPrivateReflection === trueflips artifact action gates to require explicit share/export consent - Reflection consent off —
effectiveCannotShareExport: whenreviewContainsPrivateReflection && !shareReflectionConsent, the share gate's privacy level becomes'private'and is disallowed - Decision status changes —
decisionStatuses[id]mutated by decision UI (not enumerated in the top-of-function block — see below); re-derivesdecisionCounts - Anchor step completed —
completedAnchors.has(routineId)toggles the routine's anchor step in the evaluation - Artifact saved —
setArtifactSavedAtupdates afterhandleSaveArtifact - Artifact exported (gated) —
handleExportArtifactis short-circuited viaif (!artifactActionGates.export.allowed) return; - Error (recoverable) — relies on app-level error boundary
- Offline — purely client; identical offline (saved artifacts in localStorage)
- Gated — privacy gates govern share/export of reflection text; shell hydration also requires a real pro entitlement from the BFF
- Standalone PWA — no shell chrome around the page
Interactions#
Top-level controls (verified in component head)#
- Back button —
onBackcallback wired torouter.back()or shellgoHome - Window selector (weekly / quarterly) —
setReviewWindow(...) - Goal selector —
setSelectedGoalId(...)driven by the goals grid - Routine selector —
setSelectedRoutineId(...)driven by the routines panel - Reflection prompt selector —
setSelectedPromptId(...)from a prompt list - Reflection draft textarea —
setReflectionDraft(...) - Capture reflection — sets
reflectionCapturedAtto a timestamp - Share / Export consent toggles —
setShareReflectionConsent,setExportReflectionConsent - Decision status buttons — accept / defer / discard per decision
(
setDecisionStatuses(...)) - Anchor step toggle —
setCompletedAnchors(...)per routine - Artifact panel: Save / Share / Export buttons, each gated by
artifactActionGates[action]
Computed surfaces (presentational)#
- Coaching shell summary cards — title + summary per card
- Continuity cards (3) — Next practice / Weekly review thread / Reflection thread
- Tara suggestions —
taraSuggestionsarray ofAretePlanReviewTaraSuggestion - Assistant accountability flows —
assistantFlowsarray ofAreteAssistantAccountabilityFlow - Progress map signals —
progressMapSignals(per-region scores) - Pattern dimensions —
patternDimensions(per-dimension insights) - Governance summary — three lines per save / share / export gate status
Data & contracts#
- Reads: imports from
@oshun/domain-arete:buildAreteAssistantAccountabilityFlows,buildAretePlanReviewExport,buildAreteCoachingSummaryShellModel,buildCanonicalAreteCoachingSummary,buildCanonicalAreteGoal,buildCanonicalAreteReview,buildCanonicalAreteRoutine,buildAretePlanReviewTaraSuggestions,evaluateAreteRoutineCompletion,getAreteArtifactPolicy,resolveAreteArtifactActionGate. Types:AreteCanonicalCoachingSummary,AreteCanonicalGoal,AreteCanonicalReview,AreteCanonicalRoutine,AreteAssistantAccountabilityFlow,AreteArtifactAction,AreteArtifactActionGate,AreteNextPracticeRecommendationModel,AretePlanReviewTaraSuggestion,AreteReviewDecisionStatus. In-file fixturesgoals,routines,reflectionPrompts,reviews,coachingSummaries. - Writes:
saveAreteArtifact(localStorage); export triggerstriggerAreteArtifactDownload; no BFF write - Realtime: none
- Caching: client bundle + localStorage for saved artifacts
- Auth/role check: app-level middleware
Cross-references#
- Domain hub:
arete.md - Polished counterparts:
arete-plan.md,arete-review.md - Sibling internal alternates:
- Cross-domain: Tara suggestions are computed in-domain (Arete) but feed into a
Tara handoff via
buildAretePlanReviewTaraSuggestions - Component source:
apps/oshun/web/src/components/domains/arete/AretePlanReviewWorkspace.tsx - Library:
libs/domain-arete/*(@oshun/domain-arete) - Artifact support:
apps/oshun/web/src/components/domains/arete/areteArtifactSupport.ts,AreteArtifactActionPanel.tsx
E2E coverage#
Covered by apps/oshun/web/e2e/arete-plan-review-workspace.spec.ts.
The spec runs the dedicated route and the shell route against real dev infra. For shell hydration it upgrades the seeded account through the real admin bulk-entitlements BFF pipeline, then verifies:
- Dedicated route render and all primary workspace regions
- Goal, routine, reflection prompt, reflection draft, capture, anchor, and decision interactions
- Private-reflection share/export gates blocked before consent and enabled after consent
- Artifact save state, localStorage persistence, reload, and shell re-entry
- Gated export download and export-prepared state
- Weekly/quarterly window switching plus shell back navigation
- Tara ritual handoff into the Tara session player
- Next-practice, accountability, and recovery assistant-open events
- Recovery guidance recalculation when decisions and anchors are cleared or restored
Open questions / known gaps#
- Recoverable error boundary, explicit offline mode, and standalone PWA display remain unautomated for this route
- Saved artifacts live in localStorage only; no server persistence is covered or expected for V1
- Telemetry delivery, live screen-reader behavior, and touch-device ergonomics still need the broader runtime/manual pass
- This route is the unified internal plan-review workspace; polished
/arete/planand/arete/reviewremain split surfaces with their own walkthroughs