Repository navigation
Ground Video Pack build planning in ready packs and interview answers - #2431
groupthinking with Codex wants to merge 10 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
|
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.
groupthinking
left a comment
There was a problem hiding this comment.
Review at head fc4d7047: the three unresolved inline findings are substantive. The planner bypasses verified Video Pack grounding, the existing chat clients do not render or continue the interview, and the parser silently drops tools after the eighth. Please preserve pack-bound behavior, make the full two-turn flow usable, and reject or retain oversized inputs explicitly with tests.
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Implemented in |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
groupthinking
left a comment
There was a problem hiding this comment.
Review at exact head 35cff33a416af0eb1351f50dc4d7e550a6a1a88e: the canonical issue #2428 links the GitHub Next Sparkle Pills article, whose core behavior is filling *(...) template slots while deterministic code preserves the surrounding text verbatim. This PR instead asks for automation triggers and tools, then returns an intake -> validate -> run actions workflow plan. Its API and tests do not take a template, parse or fill slots, validate slot values, or prove literal text is preserved. The Studio chat remains pack-bound and does not reach this planner. Please align the interview and implementation with the article and the user-selected template use case, including tests for unchanged literal text and missing or invalid slot values. The specific use case is still pending from Hayden, so do not substitute a guessed example as the product requirement. The current passing CI verifies the alternate workflow behavior; this PR remains changes requested and should stay open.
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
|
Please add a See governance: #898 |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
groupthinking
left a comment
There was a problem hiding this comment.
I reviewed exact head 454d7de915985d5204dd97b706a903e9a73c30c7 after the repaired main refresh. The Video Pack planning branch requires a ready, identity-matched video_id and pack_id, gathers the five interview answers, and grounds its deterministic plan in pack evidence while marking unsupported architecture decisions as unknown. Both Studio and the emitted App Builder chat carry the interview state through the follow-up; the hosted generated-chat runtime test and focused tests passed. Current hosted checks are 28 successful and 3 skipped, including the production web build and Studio preflight. All five prior review threads are resolved. I approve this planning implementation for child issue #2504 at the current head.
This is a narrow code review, not a claim that parent issue #2429 is complete or that a target repository was built, tested, or deployed. PR #2431 remains open; any merge decision is separate.

Canonical issue
Fixes #2504. Related to parent #2429. This PR delivers an interview-first, Video Pack-grounded build plan. Issue #2429's later codebase execution and real deployment outcomes remain open. Issue #2428's Sparkle template-slot objective is separate and is not implemented here.
Outcome
A request to plan a build from a video now requires a ready Video Pack with a canonical, matching
video_idandpack_id. The first response asks about the intended deliverable, trigger, tools available in the target codebase, constraints, and observable acceptance signal. After the answers are supplied, the planner emits a deterministic plan that cites pack-extracted cues, distinguishes the user's answers from video evidence, and marks unsupported frontend, backend, middleware, database, LSP, MCP, tool, and environment decisions as unknown. It does not claim that a codebase was changed or deployed.The Studio chat and hosted App Builder chat both render the questions, collect labeled or sequential answers, and send
planIntentplus accumulatedplanInterviewon follow-up. Studio now has a visible “Plan a build from this video” prompt and a multiline answer field. Normal pack chat remains on the existing grounded model path. Planning does not call Gateway or Grok.Scope and paths
apps/web/src/app/api/chat/route.ts: run the plan branch only after the existing ready, identity-matched pack check and chat quota; reject plan requests without a pack.apps/web/src/lib/video-pack-plan.ts: detect planning intent, validate interview answers, cite selected pack requirements/actions/transcript/visual/tool cues, and show unknown architecture areas. Legacy sparkle-pill wording still triggers the plan branch, but cannot produce an unbound plan.apps/web/src/components/studio/StudioIdeChat.tsxandapps/web/src/lib/emit-app-builder-sandbox.ts: complete the two-turn interview flow on the pack-bound hosted clients.CHAINING.mdand the affected route, planner, Studio, and hosted-output tests: document and verify the new contract.Example second-turn payload:
{ "query": "Here are my answers", "video_id": "auJzb1D-fag", "pack_id": "vp:v0:auJzb1D-fag", "planIntent": true, "planInterview": { "useCase": "Build a safety checklist from the video", "trigger": "User selects the source video", "tools": ["Git", "npm", "Playwright"], "constraints": "No invented video claims", "successSignal": "Checklist steps match the cited source" } }Verification
Head:
454d7de915985d5204dd97b706a903e9a73c30c7(includes repairedmainmerge0c99258342fa862e6bb1b38f8dc819879bf83175).npm run buildfrom repository root: passed, including the Next.js production build and TypeScript compilation.npm testfrom repository root: 174 test files passed; 1,530 tests passed, 28 skipped.npm run type-checkinapps/web, changed-file ESLint, andgit diff --check: passed.CHANGES_REQUESTEDdecision awaits current-head review.Risk and limits
The planner uses keyword matching to show candidate excerpts for architecture areas; those matches are not a verified design decision. A pack can omit a needed stack or codebase fact. In that case the plan explicitly asks for target-repository inspection before implementation. The plan cites extracted pack data; it does not independently rewatch the source video. The intent detector may match broad planning language, but pack identity/readiness is mandatory and normal non-planning chat is unchanged. Free chat quota still applies.
No live Studio-to-Pack-to-target-repository execution or deployment has been verified. A green local build/test run is not that outcome. Hosted checks pass and review threads are resolved; current-head review and an explicit merge decision remain separate. The parent real execution outcome remains open.
Agent handoff
Security dependency evidence
47149df9e36e58f22d25ba93de4f9851209e434b; keep the sharedmainrepair.