feat(reflect): surface filterable reflection; Health becomes review-only (Phase 2A)#17
Merged
Conversation
…mes review-only
Phase 2, piece A. The highest-value reflection feature — filterable LLM
synthesis ("What's the status of Madrid?") — was buried mid-page in /review
(Health), while the nav's /reflect page was a session ritual whose
guided-question textareas were friction.
- /reflect is now the filterable reflection tool: scope picker (whole system /
sites / options / goal spaces) → /api/reflect/analyse → synthesis, now
rendered as Markdown. page.tsx fetches the scope lists.
- Retired the /reflect session ritual (convergence sparklines, guided-question
textareas, decisions log, session save). Removed questions.ts; ReflectClient
rewritten. ConvergenceSparkline/FeedbackWidget kept (used elsewhere).
- /review (Health) is now review-only: flagged + tensions + awaiting-review.
Removed ReflectionSection and its scope queries/props — also pre-factors
Health toward the unified inbox (piece B).
- Deleted components/review/ReflectionSection.tsx (logic absorbed into
ReflectClient; Health was its only other consumer) and its test.
Untouched: /api/reflect/analyse (engine). /api/reflect/session + the
reflection_sessions table stay (table still backs reflection/run's 24h check);
reflect/types.ts kept because the session route imports ReflectionSessionPayload.
Tests: rewrote ReflectClient.test.tsx for the filterable flow (scope body,
synthesis render, error, disabled-when-empty). tsc 0, lint 0, 554 pass.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The team's highest-value reflection feature — filterable LLM synthesis ("What's the status of Madrid?") — was buried mid-page in
/review(Health) asReflectionSection, while the nav's/reflectpage was a session ritual whose guided-question textareas were the friction Robyn pushed back on. The killer feature was behind the wrong door.What
/reflectis now the filterable reflection tool: scope picker (whole system / sites / options / goal spaces) →POST /api/reflect/analyse→ synthesis, now rendered as Markdown (upgrade from plain pre-wrapped text).page.tsxfetches the scope lists./reflectsession ritual (convergence sparklines, guided-question textareas, decisions log, session save). Removedquestions.ts;ReflectClientrewritten.ConvergenceSparkline/FeedbackWidgetkept (used elsewhere — convergence still surfaces on dashboard/commitments)./review(Health) is now review-only: flagged-for-review + tension alerts + awaiting-review. RemovedReflectionSectionand its scope queries/props — which also pre-factors Health toward the unified inbox (piece B).components/review/ReflectionSection.tsx(logic absorbed intoReflectClient; Health was its only other consumer) and its test.Untouched (deliberately)
POST /api/reflect/analyse— the engine, unchanged.POST /api/reflect/session+reflection_sessionstable — the session endpoint loses its UI caller but stays (the table still backsreflection/run's 24h rate-limit check).reflect/types.tsis kept because that route importsReflectionSessionPayload.Decisions captured (yours)
/reflectentirely with the filterable tool (vs keeping the ritual).Test plan
ReflectClient.test.tsxfor the filterable flow — scope body ({type, value?, label}), synthesis render, error state, disabled-when-no-optionsReviewPage.test.tsxstill green (asserts title + flagged/tensions only)tsc --noEmit→ 0 ·eslint .→ 0 ·vitest run→ 554 passSpec:
docs/superpowers/specs/2026-06-12-surface-filterable-reflection-design.md. First slice of Phase 2 (UX). Pieces B (unified inbox), C (nav + mobile + light-mode), D (optional capture titles) follow as separate PRs.