Skip to content

feat: Add vehicle-service-advisor kit - #325

Open
saivarun1410 wants to merge 4 commits into
Lamatic:mainfrom
saivarun1410:agent/vehicle-service-advisor
Open

feat: Add vehicle-service-advisor kit#325
saivarun1410 wants to merge 4 commits into
Lamatic:mainfrom
saivarun1410:agent/vehicle-service-advisor

Conversation

@saivarun1410

@saivarun1410 saivarun1410 commented Aug 5, 2026

Copy link
Copy Markdown

What changed

Adds a complete Vehicle Service Advisor kit under kits/vehicle-service-advisor/:

  • safety-first Lamatic flow with externalized prompts, constitution, and model config
  • structured urgency, possible-cause, inspection-plan, and mechanic-handoff output
  • responsive Next.js interface with server-side Lamatic SDK integration
  • Zod validation at both request and response boundaries
  • sample-report preview for product walkthroughs without credentials
  • setup, architecture, safety, limitations, and troubleshooting documentation
  • Vercel-compatible Next.js tracing configuration

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 outputFileTracingRoot override that caused Vercel's Next.js monorepo packager to resolve the application as a nonexistent top-level /apps directory.

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 lint
  • npm run typecheck
  • npm run build
  • Vercel production prebuild and deployment
  • production route returned HTTP 200
  • automated production-browser assessment using a Toyota Corolla with a flashing check-engine light
  • rendered Stop driving and Do not drive with no browser runtime errors
  • repository required-file and reference-path audit

Notes

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.local from the provided example.

  • Added the Vehicle Service Advisor kit under kits/vehicle-service-advisor/.
  • Added configuration and deployment files:
    • .env.example files define Lamatic flow and API variables.
    • .gitignore files exclude credentials, dependencies, build output, and Lamatic state.
    • lamatic.config.ts defines kit metadata, required flow steps, and deployment links.
    • Next.js, TypeScript, ESLint, and Turbopack configuration supports local development and Vercel deployment.
  • Added documentation:
    • README.md documents purpose, architecture, setup, outputs, safety rules, privacy constraints, and limitations.
    • apps/README.md documents application setup and validation.
    • agent.md defines agent behavior, integration requirements, and failure handling.
  • Added the Lamatic flow in flows/vehicle-service-advisor.ts:
    • A trigger node receives vehicle details and observed symptoms.
    • An LLMNode uses external prompts, constitution rules, and model configuration to generate a structured assessment.
    • An API response node returns the assessment as report.
    • Flow edges connect the trigger, LLM, and response nodes.
    • The flow produces urgency guidance, possible causes, inspection steps, owner actions, clarifying questions, and mechanic handoff details.
  • Added safety and model resources:
    • The constitution defines hazard escalation, prohibited repair advice, uncertainty handling, privacy rules, and JSON output requirements.
    • The prompts enforce observation-based reasoning, safety guidance, structured output, and untrusted-input handling.
    • The model configuration selects Anthropic Claude Haiku 4.5.
  • Added the Next.js application:
    • page.tsx provides the assessment interface, loading and error states, sample-report preview, and disclaimer.
    • AssessmentForm collects vehicle details, symptoms, warning lights, service history, fuel type, and drivability.
    • AssessmentReportView displays the structured assessment and safety limitations.
    • useAssessment manages submission, report state, sample data, and errors.
    • globals.css provides responsive desktop and mobile styling.
  • Added server-side Lamatic integration:
    • assessVehicle validates requests, executes the configured flow, validates responses with Zod, and returns safe errors.
    • createLamaticClient validates environment variables and creates the Lamatic SDK client.
    • reportServerError logs structured failures without exposing sensitive details.
  • Added shared validation and types:
    • Zod schemas validate assessment inputs and flow reports.
    • TypeScript types define vehicle inputs, urgency, confidence, possible causes, inspection steps, reports, and result states.
    • SAMPLE_REPORT provides a credential-free local preview.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@saivarun1410, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2412810e-96d5-457b-b573-72aa4a63998a

📥 Commits

Reviewing files that changed from the base of the PR and between e802a4d and 212282b.

⛔ Files ignored due to path filters (1)
  • kits/vehicle-service-advisor/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • kits/vehicle-service-advisor/apps/app/globals.css
  • kits/vehicle-service-advisor/apps/components.json
  • kits/vehicle-service-advisor/apps/components/ui/button.tsx
  • kits/vehicle-service-advisor/apps/features/assessment/components/assessment-form.tsx
  • kits/vehicle-service-advisor/apps/lib/utils.ts
  • kits/vehicle-service-advisor/apps/next.config.mjs
  • kits/vehicle-service-advisor/apps/package.json
  • kits/vehicle-service-advisor/apps/postcss.config.mjs

Walkthrough

The 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.

Changes

Vehicle Service Advisor

Layer / File(s) Summary
Flow contract and safety behavior
kits/vehicle-service-advisor/constitutions/default.md, kits/vehicle-service-advisor/prompts/*, kits/vehicle-service-advisor/flows/vehicle-service-advisor.ts, kits/vehicle-service-advisor/model-configs/*, kits/vehicle-service-advisor/agent.md
Defines safety rules, untrusted-input handling, structured JSON output, prompts, model configuration, and the connected Lamatic flow.
Validated server assessment
kits/vehicle-service-advisor/apps/features/assessment/types/assessment.ts, kits/vehicle-service-advisor/apps/features/assessment/validation/assessment-schema.ts, kits/vehicle-service-advisor/apps/actions/orchestrate.ts, kits/vehicle-service-advisor/apps/lib/*
Adds shared assessment types, Zod validation, Lamatic client creation, response parsing, report mapping, server logging, and safe failure results.
Assessment interface and report display
kits/vehicle-service-advisor/apps/app/*, kits/vehicle-service-advisor/apps/features/assessment/components/*, kits/vehicle-service-advisor/apps/features/assessment/hooks/*, kits/vehicle-service-advisor/apps/features/assessment/types/sample-report.ts
Adds the assessment form, submission state management, sample report support, conditional report rendering, metadata, and responsive styling.
Kit setup and documentation
kits/vehicle-service-advisor/README.md, kits/vehicle-service-advisor/lamatic.config.ts, kits/vehicle-service-advisor/.env.example, kits/vehicle-service-advisor/apps/.env.example, kits/vehicle-service-advisor/apps/package.json, kits/vehicle-service-advisor/apps/tsconfig.json, kits/vehicle-service-advisor/apps/next.config.ts, kits/vehicle-service-advisor/apps/eslint.config.mjs, kits/vehicle-service-advisor/apps/*gitignore, kits/vehicle-service-advisor/.gitignore
Adds kit metadata, environment templates, application configuration, ignore rules, development scripts, and setup documentation.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the addition of the vehicle-service-advisor kit.
Description check ✅ Passed The description covers the project scope, setup, safety, validation, deployment, credentials, and user impact, but omits the template checklist headings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/vehicle-service-advisor

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@saivarun1410
saivarun1410 marked this pull request as ready for review August 6, 2026 05:10
@coderabbitai
coderabbitai Bot requested review from amanintech and d-pamneja August 6, 2026 05:10

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between adcfa70 and 667bd48.

⛔ Files ignored due to path filters (1)
  • kits/vehicle-service-advisor/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (30)
  • kits/vehicle-service-advisor/.env.example
  • kits/vehicle-service-advisor/.gitignore
  • kits/vehicle-service-advisor/README.md
  • kits/vehicle-service-advisor/agent.md
  • kits/vehicle-service-advisor/apps/.env.example
  • kits/vehicle-service-advisor/apps/.gitignore
  • kits/vehicle-service-advisor/apps/README.md
  • kits/vehicle-service-advisor/apps/actions/orchestrate.ts
  • kits/vehicle-service-advisor/apps/app/globals.css
  • kits/vehicle-service-advisor/apps/app/layout.tsx
  • kits/vehicle-service-advisor/apps/app/page.tsx
  • kits/vehicle-service-advisor/apps/eslint.config.mjs
  • kits/vehicle-service-advisor/apps/features/assessment/components/assessment-form.tsx
  • kits/vehicle-service-advisor/apps/features/assessment/components/assessment-report.tsx
  • kits/vehicle-service-advisor/apps/features/assessment/hooks/use-assessment.ts
  • kits/vehicle-service-advisor/apps/features/assessment/types/assessment.ts
  • kits/vehicle-service-advisor/apps/features/assessment/types/sample-report.ts
  • kits/vehicle-service-advisor/apps/features/assessment/validation/assessment-schema.ts
  • kits/vehicle-service-advisor/apps/lib/lamatic-client.ts
  • kits/vehicle-service-advisor/apps/lib/server-logger.ts
  • kits/vehicle-service-advisor/apps/next-env.d.ts
  • kits/vehicle-service-advisor/apps/next.config.ts
  • kits/vehicle-service-advisor/apps/package.json
  • kits/vehicle-service-advisor/apps/tsconfig.json
  • kits/vehicle-service-advisor/constitutions/default.md
  • kits/vehicle-service-advisor/flows/vehicle-service-advisor.ts
  • kits/vehicle-service-advisor/lamatic.config.ts
  • kits/vehicle-service-advisor/model-configs/vehicle-service-advisor_llmnode-201_generative-model-name.ts
  • kits/vehicle-service-advisor/prompts/vehicle-service-advisor_llmnode-201_system_0.md
  • kits/vehicle-service-advisor/prompts/vehicle-service-advisor_llmnode-201_user_1.md

Comment thread kits/vehicle-service-advisor/apps/features/assessment/hooks/use-assessment.ts Outdated
Comment thread kits/vehicle-service-advisor/apps/package.json
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant