feat: Add offer-negotiator kit#181
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughIntroduces a new ChangesOffer Negotiator Kit
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kits/offer-negotiator/apps/package.json (1)
1-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFile naming: guideline expects
next.config.mjs.Coding guidelines specify the kit app should have its own
next.config.mjs; this app shipsnext.config.jsinstead. Functionally both work, but flagging for consistency with the stated contract.As per coding guidelines, "the Next.js app must be located in the
apps/directory with its ownpackage.json,next.config.mjs,tsconfig.json, and.env.example."🤖 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/offer-negotiator/apps/package.json` around lines 1 - 32, The offer-negotiator app is missing the required Next.js config file naming expected by the kit contract. Add or rename the app’s Next.js config to use next.config.mjs and make sure the app references that config consistently, keeping the existing app setup in package.json unchanged. Verify the app still builds and runs with the updated config file name so it matches the required apps/ package layout alongside tsconfig.json and .env.example.Source: Coding guidelines
🤖 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/offer-negotiator/apps/components/offer-form.tsx`:
- Around line 9-42: The required indicator in Field is only visual, so update
the actual form controls to expose requirement semantics by passing required
and/or aria-required to the input in Field and the priorities textarea. Use the
existing Field component and the priorities textarea rendering to thread the
required flag through so assistive technologies can announce mandatory fields
correctly.
- Around line 1-160: The OfferForm component is still using local useState and
manual canSubmit logic instead of the required form stack. Update OfferForm to
use react-hook-form with zod-based validation, keeping the existing field names
and using the form’s submit/validation state in place of manual checks. Replace
the hand-rolled inputs, textarea, button, and labels in OfferForm/Field with
shadcn/ui form primitives so the markup matches the project standards, and make
sure the kit is updated to Tailwind CSS v4+ as required by the app guidelines.
In `@kits/offer-negotiator/apps/package.json`:
- Line 16: The package manifest currently pins lamatic to "latest", which makes
installs non-reproducible. Update the dependency in package.json to a fixed,
explicit version (ideally the exact version already tested in this workspace) so
fresh installs resolve consistently and can be rolled back safely.
- Line 25: The offer-negotiator app is still wired for Tailwind v3, so update
the Tailwind setup to the v4 package/API. Adjust the dependency in package.json
to the v4 Tailwind release, then revise the app’s PostCSS and Tailwind config
files (postcss.config.js and tailwind.config.js) to match the v4 plugin/config
approach used elsewhere in the repo. Make sure the app bootstrap and any
Tailwind imports or directives in the app entry points still resolve correctly
after the config migration.
---
Outside diff comments:
In `@kits/offer-negotiator/apps/package.json`:
- Around line 1-32: The offer-negotiator app is missing the required Next.js
config file naming expected by the kit contract. Add or rename the app’s Next.js
config to use next.config.mjs and make sure the app references that config
consistently, keeping the existing app setup in package.json unchanged. Verify
the app still builds and runs with the updated config file name so it matches
the required apps/ package layout alongside tsconfig.json and .env.example.
🪄 Autofix (Beta)
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
Run ID: 2847b997-4ba0-402d-8023-e64936e8482d
⛔ Files ignored due to path filters (1)
kits/offer-negotiator/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (28)
kits/offer-negotiator/.env.examplekits/offer-negotiator/.gitignorekits/offer-negotiator/README.mdkits/offer-negotiator/agent.mdkits/offer-negotiator/apps/.env.examplekits/offer-negotiator/apps/.gitignorekits/offer-negotiator/apps/actions/orchestrate.tskits/offer-negotiator/apps/app/globals.csskits/offer-negotiator/apps/app/layout.tsxkits/offer-negotiator/apps/app/page.tsxkits/offer-negotiator/apps/components/negotiation-brief.tsxkits/offer-negotiator/apps/components/offer-form.tsxkits/offer-negotiator/apps/lib/lamatic-client.tskits/offer-negotiator/apps/lib/types.tskits/offer-negotiator/apps/lib/utils.tskits/offer-negotiator/apps/next-env.d.tskits/offer-negotiator/apps/next.config.jskits/offer-negotiator/apps/orchestrate.jskits/offer-negotiator/apps/package.jsonkits/offer-negotiator/apps/postcss.config.jskits/offer-negotiator/apps/tailwind.config.jskits/offer-negotiator/apps/tsconfig.jsonkits/offer-negotiator/constitutions/default.mdkits/offer-negotiator/flows/offer-negotiator.tskits/offer-negotiator/lamatic.config.tskits/offer-negotiator/model-configs/offer-negotiator-flow_llmnode-516_generative-model-name.tskits/offer-negotiator/prompts/offer-negotiator-flow_llmnode-516_system_0.mdkits/offer-negotiator/prompts/offer-negotiator-flow_llmnode-516_user_1.md
| "next": "14.2.35", | ||
| "react": "^18", | ||
| "react-dom": "^18", | ||
| "lamatic": "latest", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Don't trust an unmarked package with "latest" clearance.
Pinning lamatic to "latest" means every fresh install can silently pull a different (possibly breaking) version — no reproducibility, no rollback safety.
🕵️ Proposed fix
- "lamatic": "latest",
+ "lamatic": "^1.0.0",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "lamatic": "latest", | |
| "lamatic": "^1.0.0", |
🤖 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/offer-negotiator/apps/package.json` at line 16, The package manifest
currently pins lamatic to "latest", which makes installs non-reproducible.
Update the dependency in package.json to a fixed, explicit version (ideally the
exact version already tested in this workspace) so fresh installs resolve
consistently and can be rolled back safely.
| "@types/node": "^20", | ||
| "@types/react": "^18", | ||
| "@types/react-dom": "^18", | ||
| "tailwindcss": "^3.4.1", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n## package.json\n'
cat -n kits/offer-negotiator/apps/package.json | sed -n '1,220p'
printf '\n## candidate tailwind/postcss files\n'
fd -a -t f 'tailwind.config.*|postcss.config.*|package.json|next.config.mjs|tsconfig.json|.env.example' kits/offer-negotiator/apps
printf '\n## kit guidance mentions\n'
rg -n "Tailwind|tailwindcss|postcss|shadcn|react-hook-form|zod|lucide-react|Next.js 14|Next.js 15|React 18|TypeScript" kits/offer-negotiator -g '!**/node_modules/**' -g '!**/.next/**'Repository: Lamatic/AgentKit
Length of output: 6539
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n## postcss.config.js\n'
cat -n kits/offer-negotiator/apps/postcss.config.js
printf '\n## tailwind.config.js\n'
cat -n kits/offer-negotiator/apps/tailwind.config.jsRepository: Lamatic/AgentKit
Length of output: 1361
Move this kit to Tailwind v4
kits/offer-negotiator/apps/package.json is still on tailwindcss@^3.4.1, and kits/offer-negotiator/apps/postcss.config.js / kits/offer-negotiator/apps/tailwind.config.js are set up for the v3 plugin API. This kit needs the v4 Tailwind setup required by the brief.
🤖 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/offer-negotiator/apps/package.json` at line 25, The offer-negotiator app
is still wired for Tailwind v3, so update the Tailwind setup to the v4
package/API. Adjust the dependency in package.json to the v4 Tailwind release,
then revise the app’s PostCSS and Tailwind config files (postcss.config.js and
tailwind.config.js) to match the v4 plugin/config approach used elsewhere in the
repo. Make sure the app bootstrap and any Tailwind imports or directives in the
app entry points still resolve correctly after the config migration.
Source: Coding guidelines
Address CodeRabbit review on PR Lamatic#181: - Migrate Tailwind CSS v3 -> v4 (@import "tailwindcss", @tailwindcss/postcss plugin, drop the now-unused v3 JS config) - Rebuild the offer form on react-hook-form + zod validation, replacing hand-rolled useState/canSubmit logic - Add shadcn/ui primitives (form, input, textarea, label, button) styled to the existing design system - Expose required/aria-required on mandatory fields for assistive tech - Use lucide-react icons in the form and copy buttons - Pin the lamatic dependency to ^0.3.2 instead of "latest"
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kits/offer-negotiator/apps/components/negotiation-brief.tsx (1)
8-31: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMission accomplished on the copy button — one tripwire to consider.
aria-live="polite"is placed directly on the interactive<Button>whose own text content flips between "Copied" andlabel. Screen readers can be inconsistent announcing live-region changes on focusable/interactive elements versus a dedicated non-interactive live region (e.g., a visually-hidden<span aria-live="polite">). Giventype="button"is explicitly set (good — this self-destructs any accidental form-submit risk), the only remaining loose end is announcement reliability across screen readers.Consider moving the live announcement to a small visually-hidden status element beside the button rather than on the button itself, for more consistent AT behavior.
🤖 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/offer-negotiator/apps/components/negotiation-brief.tsx` around lines 8 - 31, The CopyButton component uses aria-live on the interactive Button itself, which can lead to unreliable screen reader announcements when the label changes to "Copied". Move the live announcement to a separate non-interactive status element near CopyButton, such as a visually hidden span with aria-live="polite", and keep the button focused only on the click action and visual label/icon update.
🤖 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.
Outside diff comments:
In `@kits/offer-negotiator/apps/components/negotiation-brief.tsx`:
- Around line 8-31: The CopyButton component uses aria-live on the interactive
Button itself, which can lead to unreliable screen reader announcements when the
label changes to "Copied". Move the live announcement to a separate
non-interactive status element near CopyButton, such as a visually hidden span
with aria-live="polite", and keep the button focused only on the click action
and visual label/icon update.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0669384f-6294-4070-a9e6-60ef0c5e69c7
⛔ Files ignored due to path filters (1)
kits/offer-negotiator/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (11)
kits/offer-negotiator/apps/app/globals.csskits/offer-negotiator/apps/app/page.tsxkits/offer-negotiator/apps/components/negotiation-brief.tsxkits/offer-negotiator/apps/components/offer-form.tsxkits/offer-negotiator/apps/components/ui/button.tsxkits/offer-negotiator/apps/components/ui/form.tsxkits/offer-negotiator/apps/components/ui/input.tsxkits/offer-negotiator/apps/components/ui/label.tsxkits/offer-negotiator/apps/components/ui/textarea.tsxkits/offer-negotiator/apps/package.jsonkits/offer-negotiator/apps/postcss.config.js
Move aria-live off the interactive copy Button onto a separate sr-only status element, so screen readers announce the "copied" change reliably. Addresses the remaining CodeRabbit accessibility note on PR Lamatic#181.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
fixed all coderabbit issues |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Offer Negotiator — Offer & Salary Negotiation Copilot
A new kit that owns the offer stage of the job hunt — the one stage none of the existing kits cover. Paste your offer and priorities and get an assessment, the leverage you actually hold, target numbers, talking points, a ready-to-send counter-offer email, and a call script.
What's inside
API Request → Generate Text (LLM) → Code parse → API Response), returning a structuredanswerobject. All resources externalized as@references.agent.md,README.md,constitutions/default.md.Guardrails
Reasons from the numbers you provide plus general principles; never presents a market-salary figure as fact (estimates are flagged as assumptions); never advises dishonesty; not legal/financial advice.
Scope
Touches only
kits/offer-negotiator/**.Submitted for the AgentKit Challenge.
Added
kits/offer-negotiator/.env.exampleAdded
kits/offer-negotiator/.gitignoreAdded
kits/offer-negotiator/README.mdAdded
kits/offer-negotiator/agent.mdAdded
kits/offer-negotiator/constitutions/default.md(safety/grounding/guardrails for negotiation advice)Added
kits/offer-negotiator/lamatic.config.ts(kit registration + step keyed byOFFER_NEGOTIATOR)Added
kits/offer-negotiator/flows/offer-negotiator.ts(Offer Negotiator flow definition)Added
kits/offer-negotiator/model-configs/offer-negotiator-flow_llmnode-516_generative-model-name.ts(LLM model config:gpt-4o-mini)Added
kits/offer-negotiator/prompts/offer-negotiator-flow_llmnode-516_system_0.md(system prompt + required JSON output + guardrails)Added
kits/offer-negotiator/prompts/offer-negotiator-flow_llmnode-516_user_1.md(user prompt template for offer/comp inputs)Added runnable Next.js app under
kits/offer-negotiator/apps/**:kits/offer-negotiator/apps/.env.examplekits/offer-negotiator/apps/.gitignorekits/offer-negotiator/apps/actions/orchestrate.ts(server action to run the LamaticofferNegotiatorflow and return the structured result)kits/offer-negotiator/apps/orchestrate.js(Lamatic flow wiring: workflow idprocess.env.OFFER_NEGOTIATOR+ input schema)kits/offer-negotiator/apps/package.json,kits/offer-negotiator/apps/package-lock.jsonkits/offer-negotiator/apps/next.config.js,kits/offer-negotiator/apps/tsconfig.json,kits/offer-negotiator/apps/next-env.d.ts,kits/offer-negotiator/apps/postcss.config.jskits/offer-negotiator/apps/app/layout.tsxkits/offer-negotiator/apps/app/page.tsx(offer form → negotiation brief view)kits/offer-negotiator/apps/app/globals.csskits/offer-negotiator/apps/components/offer-form.tsx(form + Zod validation via react-hook-form)kits/offer-negotiator/apps/components/negotiation-brief.tsx(sectioned brief + copy-to-clipboard for counter email/call script)kits/offer-negotiator/apps/components/ui/button.tsx,form.tsx,input.tsx,label.tsx,textarea.tsx(shared UI primitives)kits/offer-negotiator/apps/lib/lamatic-client.ts(env-validated Lamatic client init)kits/offer-negotiator/apps/lib/types.ts(OfferInput + NegotiationResult types andemptyOffer)kits/offer-negotiator/apps/lib/utils.ts(cnutility with clsx + tailwind-merge)Flow summary (
kits/offer-negotiator/flows/offer-negotiator.ts)triggerNode(“API Request”, providesadvance_schemafor the offer input fields)dynamicNode“Generate Text” (LLM node) driven by the referenced system/user prompt markdown and the generative model configdynamicNode“Code” (code parsing step; referenced script output is used as the final answer)responseNode(“API Response”) that maps the code node output into the response shape as{ answer: "{{codeNode_533.output}}" }responseEdgeback to the trigger for completionanswerfield.