Repository navigation
Add interview-first sparkle-pills chat chaining and deterministic plan response - #2431
groupthinking with Codex wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
🔍 PR Validation |
There was a problem hiding this comment.
🟡 Changes recommended
Client integration is incomplete, planning ignores video grounding, and required tools can be silently discarded.
3 open findings
What changed in this PR
Adds an interview-first sparkle-pills branch to UVAI’s chat API, returning a deterministic plan without model calls once required answers are supplied.
Changes:
- Detect sparkle intent and request interview answers.
- Generate plans from completed interviews.
- Document the API contract and add focused route tests.
| File | Description |
|---|---|
| CHAINING.md | Documents interview and plan payloads. |
| apps/web/src/lib/sparkle-pills.ts | Implements detection, answer parsing, and planning. |
| apps/web/src/app/api/chat/route.ts | Routes sparkle requests to the new handler. |
| apps/web/src/app/api/__tests__/chat-sparkle-pills-route.test.ts | Covers interview and completed-plan responses. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const sparkleResponse = resolveSparklePillsResponse({ | ||
| query: typeof query === 'string' ? query : String(query), | ||
| sparkleInterview: body.sparkleInterview, | ||
| }); |
| if (sparkleResponse) { | ||
| return NextResponse.json(sparkleResponse); |
| .filter((entry) => entry.length > 0) | ||
| .slice(0, 8); |

Canonical issue
Linked by system automation.
Outcome
This PR adds an interview-first path for “sparkle pills” requests so the system asks clarifying questions before proposing a workflow. When required answers are provided, it returns a deterministic, action-oriented plan without invoking model providers.
Scope
requiresInterview: trueplus targeted clarifying questions when required fields are missing.provider: "sparkle-pills-planner"and a structured operational plan once interview fields are complete.CHAINING.mdwith request/response schema and runtime behavior.{ "query": "Build me a system for using sparkle pills", "sparkleInterview": { "useCase": "Manage weekday focus sessions", "trigger": "Start each weekday at 08:30", "tools": ["Google Calendar", "Slack"], "constraints": "No notifications after 21:00", "successSignal": "5 sessions completed per week" } }Risk
Sparkle detection could match unintended prompts and return interview payloads instead of normal chat output.
Revert the sparkle branch in
apps/web/src/app/api/chat/route.tsand removeapps/web/src/lib/sparkle-pills.ts.Verification
List exact automated and manual checks, tied to the current head SHA.
Production evidence
Not applicable for production behavior claims in this PR description; change is API-path scoped and documented by route contract (
CHAINING.md).Agent handoff
Security dependency evidence