Skip to content

feat: Add interview-scorecard-calibrator kit - #333

Open
Swaraj07082 wants to merge 5 commits into
Lamatic:mainfrom
Swaraj07082:feat/interview-scorecard-calibrator
Open

feat: Add interview-scorecard-calibrator kit#333
Swaraj07082 wants to merge 5 commits into
Lamatic:mainfrom
Swaraj07082:feat/interview-scorecard-calibrator

Conversation

@Swaraj07082

@Swaraj07082 Swaraj07082 commented Aug 8, 2026

Copy link
Copy Markdown

Synthesize multi-interviewer panel feedback into a calibrated hiring scorecard, disagreement map, recommendation, and decision brief for hiring managers.

Summary

  • Adds kits/interview-scorecard-calibrator (type: kit)
  • Single Lamatic flow: calibrate-scorecard (normalize → structured scorecard → hiring brief)
  • Next.js app UI for rubric + interviewer notes → scorecard, disagreements, recommendation, email draft, and brief

Problem

After panel interviews, hiring managers get fragmented notes with uneven scoring rigor and conflicting opinions. Reconciling them into a fair hire/no-hire decision is slow and inconsistent.

Solution

Paste a role rubric and multi-interviewer notes. The kit returns:

  • Per-competency calibrated scores with evidence
  • Interviewer disagreement map
  • Hire / lean-hire / lean-no / no-hire recommendation + confidence
  • Follow-up questions for missing evidence
  • Decision-summary email draft + markdown hiring-committee brief

Why unique

Distinct from resume screeners (hiring, hiring-copilot-agent, candidate-screener) and candidate self-reflection (interview-reflection-coach). This kit focuses on post-panel calibration for hiring managers.

PR Checklist

1. Select Contribution Type

  • Kit (kits/interview-scorecard-calibrator/)
  • Bundle (bundles/<bundle-name>/)
  • Template (templates/<template-name>/)

2. General Requirements

  • PR is for one project only (no unrelated changes)
  • No secrets, API keys, or real credentials are committed
  • Folder name uses kebab-case and matches the flow ID (interview-scorecard-calibrator / calibrate-scorecard)
  • All changes are documented in README.md (purpose, setup, usage)

3. File Structure (Check what applies)

  • lamatic.config.ts present with valid metadata (name, description, tags, steps, author, env keys)
    (current AgentKit format; replaces legacy config.json)
  • Flow export present at flows/calibrate-scorecard.ts with externalized:
    • prompts/
    • model-configs/
    • scripts/
    • constitutions/default.md
    • agent.md
  • .env.example with placeholder values only (kits only)
  • Flow graph follows Lamatic Studio export shape (@reference prompts/scripts/model-configs)

4. Validation

  • npm install && npm run build works locally in kits/interview-scorecard-calibrator/apps
  • npm run dev verified end-to-end against a deployed Lamatic flow ID
  • PR title starts with feat: (feat: Add interview-scorecard-calibrator kit)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • No unrelated files or projects are modified

Test plan

  • Deploy calibrate-scorecard in Lamatic Studio and bind model credentials
  • Set apps/.env.local from .env.example
  • Run cd kits/interview-scorecard-calibrator/apps && npm install && npm run dev
  • Load sample panel notes and confirm scorecard + brief render
  • Attach short walkthrough video
  • Add label: agentkit-challenge
  • Added the interview-scorecard-calibrator kit.
  • Added the calibrate-scorecard Lamatic flow.
  • Added flow nodes for input normalization, scorecard calibration with Gemini 2.5 Flash, and hiring-brief composition.
  • The flow:
    • Normalizes job, rubric, and multi-interviewer note inputs.
    • Produces evidence-based competency scores.
    • Maps interviewer disagreements and evidence gaps.
    • Produces a hire, lean-hire, lean-no, or no-hire recommendation with confidence.
    • Generates follow-up questions and a decision-summary email draft.
    • Composes a Markdown hiring-committee brief.
  • Added structured JSON output validation, scorecard types, recommendation and severity constants, and interviewer-note splitting utilities.
  • Added prompts with safeguards for untrusted data, fairness, confidentiality, neutral decisions, and evidence-based recommendations.
  • Added a Next.js application with input forms, sample data, validation, server-side orchestration, Lamatic client configuration, error handling, and result rendering.
  • Added reusable Button, Input, and Textarea components and shared Tailwind class utilities.
  • Added kit and application configuration, Node.js 20.9+ support, TypeScript, Next.js, Tailwind, PostCSS, and environment templates.
  • Added README files and agent.md documentation for setup, deployment, inputs, outputs, and flow behavior.
  • Added kit metadata and links in lamatic.config.ts.
  • Added ignore rules for dependencies, build output, Lamatic files, logs, certificates, and environment files.
  • Local application build validation is marked complete.
  • End-to-end deployment testing, workflow checks, review-comment resolution, and walkthrough video remain pending.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Changes

The kit adds a scorecard calibration flow, Lamatic server integration, and a Next.js interface. It validates multi-interviewer feedback and produces calibrated scores, recommendations, disagreements, follow-up questions, email drafts, and hiring briefs with documented guardrails.

Interview Scorecard Calibration

Layer / File(s) Summary
Calibration contracts and guardrails
kits/interview-scorecard-calibrator/lamatic.config.ts, constitutions/*, prompts/*, model-configs/*, apps/lib/scorecard.ts, README.md, agent.md
Defines kit metadata, safety constraints, model settings, prompt schemas, scorecard validation, and setup documentation.
Calibration workflow
kits/interview-scorecard-calibrator/flows/*, scripts/*
Normalizes interviewer notes, calibrates feedback, composes a hiring brief, and returns structured API output.
Server orchestration and Lamatic access
kits/interview-scorecard-calibrator/apps/actions/*, apps/lib/lamatic-client.ts, apps/orchestrate.js, .env.example
Validates inputs and environment variables, invokes the configured Lamatic flow, parses responses, and maps errors.
Next.js calibration interface
kits/interview-scorecard-calibrator/apps/app/*, apps/components/ui/*, apps/lib/utils.ts, apps/package.json, apps/tsconfig.json, apps/next.config.ts, apps/postcss.config.mjs, apps/.gitignore, apps/.env.example, apps/README.md
Adds the calibration form, result views, styling, reusable controls, sample data, application configuration, and local setup instructions.

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 41.18% 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 and concisely identifies the addition of the interview-scorecard-calibrator kit.
Description check ✅ Passed The description covers the kit purpose, changes, checklist, validation status, and test plan; several optional validation tasks remain unchecked.
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 8, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/interview-scorecard-calibrator

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.

@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: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md (1)

5-12: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Mission directive: align the next-step label across both compose prompts.

The system prompt requires Recommended next step, while the user prompt requests Suggested next step. The model can satisfy one instruction and violate the other. Choose one exact label and use it in both files.

  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md#L5-L12: change the required phrase if Suggested next step is the intended output.
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_user.md#L7-L12: change the section heading if Recommended next step is the intended output.
🤖 Prompt for 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.

In
`@kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md`
around lines 5 - 12, Align the next-step label across both compose prompts by
choosing one exact phrase and using it consistently: update
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md
lines 5-12 and
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_user.md
lines 7-12 so the required ending and section heading match exactly.
🤖 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/interview-scorecard-calibrator/apps/actions/orchestrate.ts`:
- Line 3: Update the configuration lookup used by getCalibrateFlowId and
getLamaticClient so it imports and reads the kit-root lamatic.config.ts
directly, rather than routing the parent config through
apps/lib/lamatic-client.ts. Preserve the existing root-level config location and
use the already-enabled external directory import support.

In `@kits/interview-scorecard-calibrator/apps/app/page.tsx`:
- Around line 49-52: Update asScorecard to validate the complete nested
Scorecard schema, including competencies, disagreements, evidence, and
interviewers, ensuring each field has the expected array and item shapes before
returning it. In the flow response handling, call this validator before
setScorecard; when validation fails, display the existing error state and do not
render a partial scorecard.
- Around line 78-101: Update onSubmit so rejections from calibrateScorecard are
caught, the error state is set appropriately, and loading is always cleared in a
finally block. Preserve the existing response success and failure handling while
ensuring form controls are re-enabled when the request throws.
- Around line 63-115: Replace the independent form state and FormEvent
submission in Page with react-hook-form useForm configured with a Zod resolver
and a schema validating jobTitle, level, rubric, and interviewerNotes before
calling calibrateScorecard; preserve the existing loading, error, result, and
sample/reset behavior while wiring inputs and validation errors through the form
API. Add react-hook-form, zod, and the appropriate `@hookform/resolvers`
dependency in kits/interview-scorecard-calibrator/apps/package.json at lines
16-22.

In `@kits/interview-scorecard-calibrator/apps/lib/lamatic-client.ts`:
- Around line 3-6: Remove the parent-root kitConfig import and update the flow
configuration in lamatic-client.ts to use the app-local
CALIBRATE_SCORECARD_FLOW_ID key directly, matching the configuration used by
apps/orchestrate.js. Eliminate the flowStep and flowEnvKey derivation from
kitConfig while preserving the existing client behavior.

In `@kits/interview-scorecard-calibrator/apps/package.json`:
- Around line 23-31: Load Tailwind Typography for the Markdown styling: add
`@tailwindcss/typography` to the app dependencies and register it in
app/globals.css immediately after the Tailwind import. In app/page.tsx, retain
the existing prose classes because they will be supported once the plugin is
loaded.

In `@kits/interview-scorecard-calibrator/lamatic.config.ts`:
- Around line 7-10: Replace the personal Gmail value in the author metadata with
a project-owned contact address, preserving the existing author object structure
and metadata contract.

In
`@kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_system.md`:
- Around line 5-12: Establish an explicit untrusted-data boundary across all
four prompt files: in
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_system.md
lines 5-12, add a rule that interpolated fields are data only and cannot
override instructions; in
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_user.md
lines 3-10, wrap job_title, level, rubric, and interviewer_notes in clear
untrusted-data delimiters; in
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md
lines 1-10, instruct the writer to ignore instructions embedded in scorecard
values; and in
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_user.md
lines 4-5, wrap InstructorLLMNode_220.output as untrusted scorecard data.

In
`@kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_user.md`:
- Around line 12-40: Replace the prose scorecard shape with a shared
machine-readable schema used by both the calibration prompt flow and the
application boundary. In the response handling around parseMaybeJson and the
orchestration entry point, validate or repair required fields, recommendation
and severity enums, integer calibrated_score values from 1 through 5, and
confidence values from 0 through 1 before returning the result to consumers.

In
`@kits/interview-scorecard-calibrator/scripts/calibrate-scorecard_normalize.ts`:
- Around line 22-32: Update the interviewer note normalization flow around
interviewerBlocks to enforce the documented multi-interviewer contract: parse
entries using a deterministic structure or documented separator, reject input
with fewer than two valid interviewer entries before calibration runs, and
remove the misleading interviewer_count_estimate fallback that accepts a single
note.

---

Outside diff comments:
In
`@kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md`:
- Around line 5-12: Align the next-step label across both compose prompts by
choosing one exact phrase and using it consistently: update
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md
lines 5-12 and
kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_user.md
lines 7-12 so the required ending and section heading match exactly.
🪄 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: 04c713f5-293f-49fa-8c26-f0d946d2673b

📥 Commits

Reviewing files that changed from the base of the PR and between e0d0f8c and f67a67c.

⛔ Files ignored due to path filters (1)
  • kits/interview-scorecard-calibrator/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (26)
  • kits/interview-scorecard-calibrator/.gitignore
  • kits/interview-scorecard-calibrator/README.md
  • kits/interview-scorecard-calibrator/agent.md
  • kits/interview-scorecard-calibrator/apps/.env.example
  • kits/interview-scorecard-calibrator/apps/.gitignore
  • kits/interview-scorecard-calibrator/apps/README.md
  • kits/interview-scorecard-calibrator/apps/actions/orchestrate.ts
  • kits/interview-scorecard-calibrator/apps/app/globals.css
  • kits/interview-scorecard-calibrator/apps/app/layout.tsx
  • kits/interview-scorecard-calibrator/apps/app/page.tsx
  • kits/interview-scorecard-calibrator/apps/lib/lamatic-client.ts
  • kits/interview-scorecard-calibrator/apps/next.config.ts
  • kits/interview-scorecard-calibrator/apps/orchestrate.js
  • kits/interview-scorecard-calibrator/apps/package.json
  • kits/interview-scorecard-calibrator/apps/postcss.config.mjs
  • kits/interview-scorecard-calibrator/apps/tsconfig.json
  • kits/interview-scorecard-calibrator/constitutions/default.md
  • kits/interview-scorecard-calibrator/flows/calibrate-scorecard.ts
  • kits/interview-scorecard-calibrator/lamatic.config.ts
  • kits/interview-scorecard-calibrator/model-configs/calibrate-scorecard_calibrate.ts
  • kits/interview-scorecard-calibrator/model-configs/calibrate-scorecard_compose.ts
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_system.md
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_user.md
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_user.md
  • kits/interview-scorecard-calibrator/scripts/calibrate-scorecard_normalize.ts

Comment thread kits/interview-scorecard-calibrator/apps/actions/orchestrate.ts Outdated
Comment on lines +49 to +52
function asScorecard(value: unknown): Scorecard | null {
if (!value || typeof value !== "object") return null;
return value as Scorecard;
}

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.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Mission item: Validate the scorecard payload before rendering.

asScorecard accepts any object. The flow response is untyped. A payload with competencies, disagreements, evidence, or interviewers set to an object or string passes this check. The later .map() or .join() call then throws.

Validate the full nested result schema before calling setScorecard. If validation fails, show an error instead of rendering a partial scorecard.

🤖 Prompt for 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.

In `@kits/interview-scorecard-calibrator/apps/app/page.tsx` around lines 49 - 52,
Update asScorecard to validate the complete nested Scorecard schema, including
competencies, disagreements, evidence, and interviewers, ensuring each field has
the expected array and item shapes before returning it. In the flow response
handling, call this validator before setScorecard; when validation fails,
display the existing error state and do not render a partial scorecard.

Comment thread kits/interview-scorecard-calibrator/apps/app/page.tsx
Comment thread kits/interview-scorecard-calibrator/apps/app/page.tsx Outdated
Comment thread kits/interview-scorecard-calibrator/apps/lib/lamatic-client.ts Outdated
Comment thread kits/interview-scorecard-calibrator/apps/package.json
Comment thread kits/interview-scorecard-calibrator/lamatic.config.ts
Comment thread kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_user.md Outdated
Comment thread kits/interview-scorecard-calibrator/scripts/calibrate-scorecard_normalize.ts Outdated

@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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
kits/interview-scorecard-calibrator/apps/app/page.tsx (2)

138-176: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Mission: Apply kit color tokens to the new controls.

The new Level and interviewer-notes controls use fixed slate and teal palette classes. Use the CSS variables from app/globals.css for their background, border, text, and focus styling.

As per coding guidelines, “use CSS variables for styling”.

🤖 Prompt for 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.

In `@kits/interview-scorecard-calibrator/apps/app/page.tsx` around lines 138 -
176, Update the Level and interviewerNotes controls to replace fixed slate/teal
Tailwind palette classes with the CSS variable-based color tokens defined in
app/globals.css, covering background, border, text, and focus-ring styling while
preserving the existing layout and disabled behavior.

Source: Coding guidelines


134-176: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Mission: Announce validation failures to assistive technology.

The controls do not expose aria-invalid or associate validation text with the invalid field. Add field-specific error IDs, aria-describedby, and role="alert" on the error messages.

🤖 Prompt for 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.

In `@kits/interview-scorecard-calibrator/apps/app/page.tsx` around lines 134 -
176, Update the form fields registered as jobTitle, level, rubric, and
interviewerNotes to expose validation state with aria-invalid and associate each
control with a unique field-specific error ID via aria-describedby when an error
exists. Add role="alert" to each corresponding validation message while
preserving the existing error rendering and messages.
🤖 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/interview-scorecard-calibrator/apps/lib/lamatic-client.ts`:
- Around line 7-14: Update getCalibrateFlowId’s missing-flowId error message to
use deployment-neutral guidance: instruct the operator to set
CALIBRATE_SCORECARD_FLOW_ID in the application environment, and remove the
.env.local-specific wording.

In
`@kits/interview-scorecard-calibrator/scripts/calibrate-scorecard_normalize.ts`:
- Around line 8-12: Update splitInterviewerNotes in
kits/interview-scorecard-calibrator/scripts/calibrate-scorecard_normalize.ts and
the corresponding heading-splitting logic in
kits/interview-scorecard-calibrator/apps/lib/scorecard.ts (lines 122-126) to
recognize named headings such as “Interviewer 1 (Alice, Staff Eng):”, while
preserving existing numbered headings and separator-based splitting. Keep the
heading pattern identical in both files so workflow normalization and client
validation behave consistently.

---

Outside diff comments:
In `@kits/interview-scorecard-calibrator/apps/app/page.tsx`:
- Around line 138-176: Update the Level and interviewerNotes controls to replace
fixed slate/teal Tailwind palette classes with the CSS variable-based color
tokens defined in app/globals.css, covering background, border, text, and
focus-ring styling while preserving the existing layout and disabled behavior.
- Around line 134-176: Update the form fields registered as jobTitle, level,
rubric, and interviewerNotes to expose validation state with aria-invalid and
associate each control with a unique field-specific error ID via
aria-describedby when an error exists. Add role="alert" to each corresponding
validation message while preserving the existing error rendering and messages.
🪄 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: 5e98d9d2-8f58-448c-8235-972ed66059cf

📥 Commits

Reviewing files that changed from the base of the PR and between f67a67c and bab2418.

⛔ Files ignored due to path filters (1)
  • kits/interview-scorecard-calibrator/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (16)
  • kits/interview-scorecard-calibrator/.env.example
  • kits/interview-scorecard-calibrator/README.md
  • kits/interview-scorecard-calibrator/apps/.env.example
  • kits/interview-scorecard-calibrator/apps/actions/orchestrate.ts
  • kits/interview-scorecard-calibrator/apps/app/globals.css
  • kits/interview-scorecard-calibrator/apps/app/page.tsx
  • kits/interview-scorecard-calibrator/apps/lib/lamatic-client.ts
  • kits/interview-scorecard-calibrator/apps/lib/scorecard.ts
  • kits/interview-scorecard-calibrator/apps/next.config.ts
  • kits/interview-scorecard-calibrator/apps/package.json
  • kits/interview-scorecard-calibrator/lamatic.config.ts
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_system.md
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_calibrate_user.md
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_user.md
  • kits/interview-scorecard-calibrator/scripts/calibrate-scorecard_normalize.ts

Comment on lines +7 to +14
export function getCalibrateFlowId() {
const flowId = process.env[FLOW_ENV_KEY];
if (!flowId) {
throw new Error(
`${FLOW_ENV_KEY} is not set. Please add it to your .env.local file.`,
);
}
return flowId;

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Mission: Use a deployment-neutral configuration error.

When this app runs on Vercel, users cannot correct a missing variable through .env.local. Tell the operator to set CALIBRATE_SCORECARD_FLOW_ID in the application environment instead.

🤖 Prompt for 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.

In `@kits/interview-scorecard-calibrator/apps/lib/lamatic-client.ts` around lines
7 - 14, Update getCalibrateFlowId’s missing-flowId error message to use
deployment-neutral guidance: instruct the operator to set
CALIBRATE_SCORECARD_FLOW_ID in the application environment, and remove the
.env.local-specific wording.

@Swaraj07082
Swaraj07082 force-pushed the feat/interview-scorecard-calibrator branch from bab2418 to aa7ee44 Compare August 8, 2026 08:19

@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/interview-scorecard-calibrator/apps/app/page.tsx`:
- Around line 42-48: Update recommendationStyles to replace hard-coded color
utility classes with classes that reference semantic CSS variables for each
recommendation state. Define the required recommendation variables in the kit’s
applicable styling scope, preserving distinct hire, lean-hire, lean-no, no-hire,
and fallback appearances while complying with the CSS-variable styling rule.
- Around line 124-202: Replace the native input, textarea, and button elements
in the form with the shadcn/ui Input, Textarea, and Button components, importing
them from the project’s established shadcn/ui locations. Preserve each control’s
existing props, including react-hook-form register bindings, submit/reset
behavior, loading-based disabled states, labels, validation messages, and button
styling intent.

In `@kits/interview-scorecard-calibrator/apps/lib/scorecard.ts`:
- Around line 64-117: Update the scorecard validation flow around the
recommendation, confidence, competencies, disagreements, and final Scorecard
construction to reject missing or incorrectly typed required fields instead of
coercing them through Number or asString fallbacks. Validate confidence is a
number, and require the documented primitive types for required fields such as
candidate_summary and each competency name before pushing objects or returning
the Scorecard; preserve null for invalid payloads and existing range/enum
checks.

In
`@kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md`:
- Around line 5-8: Extend the trust boundary in the prompt to explicitly
classify interpolated job title and level values, along with all scorecard
fields, as untrusted data. Instruct the model to ignore any embedded
instructions, role changes, or policy overrides in these values and use them
only as factual content for the brief.

In `@kits/interview-scorecard-calibrator/README.md`:
- Around line 24-29: Update the Node.js prerequisite in the “Providers &
Prerequisites” section to state Node.js 20.9+ instead of Node.js 18+, reflecting
the minimum version required by Next.js 16.x.
🪄 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: af486171-29b4-4923-927c-b0642a7d022c

📥 Commits

Reviewing files that changed from the base of the PR and between bab2418 and c7f02a2.

📒 Files selected for processing (9)
  • kits/interview-scorecard-calibrator/README.md
  • kits/interview-scorecard-calibrator/apps/actions/orchestrate.ts
  • kits/interview-scorecard-calibrator/apps/app/page.tsx
  • kits/interview-scorecard-calibrator/apps/lib/lamatic-client.ts
  • kits/interview-scorecard-calibrator/apps/lib/scorecard.ts
  • kits/interview-scorecard-calibrator/apps/next.config.ts
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_user.md
  • kits/interview-scorecard-calibrator/scripts/calibrate-scorecard_normalize.ts

Comment thread kits/interview-scorecard-calibrator/apps/app/page.tsx Outdated
Comment thread kits/interview-scorecard-calibrator/apps/app/page.tsx
Comment thread kits/interview-scorecard-calibrator/apps/lib/scorecard.ts Outdated
Comment thread kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md Outdated
Comment thread kits/interview-scorecard-calibrator/README.md
…scorecard-calibrator kit

- Updated Node.js requirement from 18+ to 20.9+ in README.md.
- Added new dependencies: @radix-ui/react-slot, class-variance-authority, clsx, and tailwind-merge in package.json and package-lock.json.
- Introduced new UI components: Button, Input, and Textarea for improved form handling.
- Enhanced global styles with new CSS variables for better theming.
- Refactored scorecard parsing logic for stricter type validation.
- Updated prompts to clarify trust boundaries for scorecard data.

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kits/interview-scorecard-calibrator/apps/app/page.tsx (1)

150-154: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Mission: Show the level validation error.

When formSchema rejects level, the form prevents submission but does not render errors.level. Add the same error message pattern used for jobTitle, rubric, and interviewerNotes.

Proposed fix
                   <Input
                     placeholder="L5"
                     disabled={loading}
                     {...register("level")}
                   />
+                  {errors.level && (
+                    <p className="text-sm text-rose-600">{errors.level.message}</p>
+                  )}
🤖 Prompt for 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.

In `@kits/interview-scorecard-calibrator/apps/app/page.tsx` around lines 150 -
154, Update the level field rendering near register("level") to display
errors.level using the same validation-message pattern already used by jobTitle,
rubric, and interviewerNotes. Keep the existing Input behavior unchanged and
place the message alongside the level field.
🤖 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/interview-scorecard-calibrator/apps/components/ui/button.tsx`:
- Around line 29-48: Forward refs through the exported Button component by
wrapping it with React.forwardRef and passing the ref to the underlying Comp
while preserving its existing props and variants. Apply the same ref-forwarding
change to kits/interview-scorecard-calibrator/apps/components/ui/input.tsx lines
5-17 and kits/interview-scorecard-calibrator/apps/components/ui/textarea.tsx
lines 5-16, passing each ref to its underlying input or textarea element.

---

Outside diff comments:
In `@kits/interview-scorecard-calibrator/apps/app/page.tsx`:
- Around line 150-154: Update the level field rendering near register("level")
to display errors.level using the same validation-message pattern already used
by jobTitle, rubric, and interviewerNotes. Keep the existing Input behavior
unchanged and place the message alongside the level field.
🪄 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: 5759fa85-1b1a-4530-822d-1ec6e1c0f4ed

📥 Commits

Reviewing files that changed from the base of the PR and between c7f02a2 and d4ae24c.

⛔ Files ignored due to path filters (1)
  • kits/interview-scorecard-calibrator/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • kits/interview-scorecard-calibrator/README.md
  • kits/interview-scorecard-calibrator/apps/app/globals.css
  • kits/interview-scorecard-calibrator/apps/app/page.tsx
  • kits/interview-scorecard-calibrator/apps/components/ui/button.tsx
  • kits/interview-scorecard-calibrator/apps/components/ui/input.tsx
  • kits/interview-scorecard-calibrator/apps/components/ui/textarea.tsx
  • kits/interview-scorecard-calibrator/apps/lib/scorecard.ts
  • kits/interview-scorecard-calibrator/apps/lib/utils.ts
  • kits/interview-scorecard-calibrator/apps/package.json
  • kits/interview-scorecard-calibrator/prompts/calibrate-scorecard_compose_system.md

Comment thread kits/interview-scorecard-calibrator/apps/components/ui/button.tsx Outdated
…dling in scorecard form

- Updated Button, Input, and Textarea components to use React.forwardRef for better ref management.
- Added error message display for the level input in the scorecard form to improve user feedback.

@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: 2

🤖 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/interview-scorecard-calibrator/apps/app/page.tsx`:
- Around line 155-157: Update the level field around its Input and label so the
error paragraph is outside the surrounding label, has a stable id, and the Input
sets aria-invalid when errors.level exists plus aria-describedby only in that
case. Apply the same accessible error-wiring pattern to every other field error,
using each field’s corresponding error key and unique message id.
- Around line 155-157: Replace the hard-coded text-rose-600 class in the level
validation error rendering with the app’s semantic validation/error color CSS
variable, defining that variable in the app CSS if it does not already exist.
Preserve the existing errors.level conditional and message rendering.
🪄 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: b8562e62-914b-4fd1-83a8-6caa5154f9a9

📥 Commits

Reviewing files that changed from the base of the PR and between d4ae24c and 345c1ea.

📒 Files selected for processing (4)
  • kits/interview-scorecard-calibrator/apps/app/page.tsx
  • kits/interview-scorecard-calibrator/apps/components/ui/button.tsx
  • kits/interview-scorecard-calibrator/apps/components/ui/input.tsx
  • kits/interview-scorecard-calibrator/apps/components/ui/textarea.tsx

Comment thread kits/interview-scorecard-calibrator/apps/app/page.tsx
…inputs

- Enhanced accessibility by adding aria attributes to Input and Textarea components.
- Updated error message display for job title, level, rubric, and interviewer notes fields to improve user experience.
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