feat: Add vehicle-service-advisor kit - #325
Conversation
|
Warning Review limit reached
Next review available in: 35 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
WalkthroughThe PR adds a safety-focused Vehicle Service Advisor Lamatic flow and a Next.js application. It validates vehicle inputs and generated reports, executes server-side assessments, renders structured reports, and documents setup and operational limits. ChangesVehicle Service Advisor
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
:robot_face: AgentKit Structural ValidationNew Contributions Detected
Check Results
🎉 All checks passed! This contribution follows the AgentKit structure. |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@kits/vehicle-service-advisor/apps/features/assessment/components/assessment-form.tsx`:
- Around line 118-120: Update the “Preview sample report” button in the
assessment form to set its disabled state from isLoading, preventing
onShowSample while the assessment submission is pending; preserve the existing
button label and click behavior when loading is false.
In
`@kits/vehicle-service-advisor/apps/features/assessment/hooks/use-assessment.ts`:
- Around line 21-28: Update the assessment submission flow around assessVehicle
so setIsLoading(false) executes in a finally block even when the server action
rejects. Preserve the existing success handling, report assignment, and error
fallback for resolved unsuccessful results, while ensuring rejected requests
also surface through the existing error state as appropriate.
In
`@kits/vehicle-service-advisor/apps/features/assessment/types/sample-report.ts`:
- Around line 4-48: Update the sample report’s stopDriving field to true and
revise the safetyMessage, ownerActions, and inspectionPlan guidance to prohibit
continued driving and recommend towing or immediate professional inspection.
Keep the overheating evidence and diagnostic details unchanged while ensuring
the preview consistently communicates a no-drive response.
In `@kits/vehicle-service-advisor/apps/package.json`:
- Around line 12-17: Update the app package configuration around the
dependencies block to declare the required UI stack: Tailwind CSS v4 tooling,
react-hook-form, lucide-react, shadcn/ui components, and next.config.mjs, while
preserving the existing Next.js, React, Zod, and lamatic dependencies. Add the
corresponding missing configuration files, or reference the repository-level
source that provides them.
In
`@kits/vehicle-service-advisor/prompts/vehicle-service-advisor_llmnode-201_system_0.md`:
- Around line 11-17: Update the JSON response schema in the system prompt to
define stop_driving as urgency-dependent: require true when urgency is stop_now
and false for urgent, soon, or monitor. Keep the existing response shape and
valid urgency values unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d48701d6-9451-446f-a7e3-b61743118e0f
⛔ Files ignored due to path filters (1)
kits/vehicle-service-advisor/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (30)
kits/vehicle-service-advisor/.env.examplekits/vehicle-service-advisor/.gitignorekits/vehicle-service-advisor/README.mdkits/vehicle-service-advisor/agent.mdkits/vehicle-service-advisor/apps/.env.examplekits/vehicle-service-advisor/apps/.gitignorekits/vehicle-service-advisor/apps/README.mdkits/vehicle-service-advisor/apps/actions/orchestrate.tskits/vehicle-service-advisor/apps/app/globals.csskits/vehicle-service-advisor/apps/app/layout.tsxkits/vehicle-service-advisor/apps/app/page.tsxkits/vehicle-service-advisor/apps/eslint.config.mjskits/vehicle-service-advisor/apps/features/assessment/components/assessment-form.tsxkits/vehicle-service-advisor/apps/features/assessment/components/assessment-report.tsxkits/vehicle-service-advisor/apps/features/assessment/hooks/use-assessment.tskits/vehicle-service-advisor/apps/features/assessment/types/assessment.tskits/vehicle-service-advisor/apps/features/assessment/types/sample-report.tskits/vehicle-service-advisor/apps/features/assessment/validation/assessment-schema.tskits/vehicle-service-advisor/apps/lib/lamatic-client.tskits/vehicle-service-advisor/apps/lib/server-logger.tskits/vehicle-service-advisor/apps/next-env.d.tskits/vehicle-service-advisor/apps/next.config.tskits/vehicle-service-advisor/apps/package.jsonkits/vehicle-service-advisor/apps/tsconfig.jsonkits/vehicle-service-advisor/constitutions/default.mdkits/vehicle-service-advisor/flows/vehicle-service-advisor.tskits/vehicle-service-advisor/lamatic.config.tskits/vehicle-service-advisor/model-configs/vehicle-service-advisor_llmnode-201_generative-model-name.tskits/vehicle-service-advisor/prompts/vehicle-service-advisor_llmnode-201_system_0.mdkits/vehicle-service-advisor/prompts/vehicle-service-advisor_llmnode-201_user_1.md
|
Hi @saivarun1410! 👋 Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review. Steps to follow:
This helps keep the review process efficient for everyone. Thank you! 🙏 |
What changed
Adds a complete Vehicle Service Advisor kit under
kits/vehicle-service-advisor/:Live demo
https://agent-kit-smoky.vercel.app
Why
Vehicle owners often describe warning lights, noises, smells, and drivability issues imprecisely. This kit turns those observations into a focused pre-inspection brief while explicitly avoiding false diagnostic certainty and unsafe repair advice.
The deployment follow-up removes a custom
outputFileTracingRootoverride that caused Vercel's Next.js monorepo packager to resolve the application as a nonexistent top-level/appsdirectory.User impact
Owners get clear urgency guidance and a better workshop handoff. Technicians receive a concise, evidence-based symptom summary instead of an unstructured description.
Validation
npm run lintnpm run typechecknpm run buildStop drivingandDo not drivewith no browser runtime errorsNotes
The Lamatic provider credential, project API key, and deployed flow ID are intentionally excluded. Import the flow into Studio, select a provider credential, deploy it, and populate
apps/.env.localfrom the provided example.kits/vehicle-service-advisor/..env.examplefiles define Lamatic flow and API variables..gitignorefiles exclude credentials, dependencies, build output, and Lamatic state.lamatic.config.tsdefines kit metadata, required flow steps, and deployment links.README.mddocuments purpose, architecture, setup, outputs, safety rules, privacy constraints, and limitations.apps/README.mddocuments application setup and validation.agent.mddefines agent behavior, integration requirements, and failure handling.flows/vehicle-service-advisor.ts:LLMNodeuses external prompts, constitution rules, and model configuration to generate a structured assessment.report.page.tsxprovides the assessment interface, loading and error states, sample-report preview, and disclaimer.AssessmentFormcollects vehicle details, symptoms, warning lights, service history, fuel type, and drivability.AssessmentReportViewdisplays the structured assessment and safety limitations.useAssessmentmanages submission, report state, sample data, and errors.globals.cssprovides responsive desktop and mobile styling.assessVehiclevalidates requests, executes the configured flow, validates responses with Zod, and returns safe errors.createLamaticClientvalidates environment variables and creates the Lamatic SDK client.reportServerErrorlogs structured failures without exposing sensitive details.SAMPLE_REPORTprovides a credential-free local preview.