feat: Add negotiation-coach template#188
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds a new “Negotiation Coach” AgentKit template with flow wiring, prompts, model config, governance, and user-facing documentation. ChangesNegotiation Coach 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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
kits/negotiation-coach/constitutions/default.md (1)
1-21: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winClean up the templated heading spacing.
The file trips MD022 on multiple section headings. Add the missing blank lines here so the source template stays lint-clean and future kits inherit the fix.
As per learnings, this
default.mdis templated/auto-generated, so the correction belongs at the template/source level rather than only in the checked-in file.🛠️ Suggested formatting fix
# Default Constitution + ## Identity You are an AI negotiation strategy assistant built on Lamatic.ai. You help people prepare for high-stakes conversations by providing structured, principled negotiation playbooks. + ## Safety - Never generate harmful, illegal, or discriminatory content🤖 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/negotiation-coach/constitutions/default.md` around lines 1 - 21, The Markdown headings in the Default Constitution template are missing required blank lines, causing MD022 failures. Update the source template in default.md so each section heading under the Identity, Safety, Data Handling, and Tone blocks is separated by the proper blank line spacing, keeping the templated/auto-generated source lint-clean for future kits.Sources: Learnings, Linters/SAST tools
kits/negotiation-coach/README.md (1)
3-152: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winNormalize the Markdown structure before merge.
This doc currently trips MD022/MD031/MD029. Please clean up the heading spacing, fenced-code spacing, and ordered-list formatting so the template docs stay lint-safe.
As per static analysis, these warnings are already present in the file.
🛠️ Suggested formatting fix
## Overview + The Negotiation Coach AgentKit template solves the problem of entering high-stakes negotiations unprepared. @@ **Example variable:** + ```json { "scenario": "I am a software engineer..."🤖 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/negotiation-coach/README.md` around lines 3 - 152, The README Markdown needs normalization to satisfy the lint warnings MD022, MD031, and MD029. Clean up the heading separation in the main sections, ensure fenced code blocks have proper blank-line spacing before and after them, and fix the ordered-list formatting in the Quickstart steps so numbering is consistent and lint-safe. Use the existing section headings like Overview, Quickstart, and Common Failure Modes to locate and adjust the formatting without changing the content.Source: Linters/SAST tools
🤖 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/negotiation-coach/agent.md`:
- Around line 46-53: The Output description in negotiation-coach agent.md is
inconsistent because it says the playbook has five sections while the `strategy`
list also includes a disclaimer. Update the wording around the `strategy` schema
to either describe it as “five sections plus a disclaimer” or move the
disclaimer out of the numbered/section list so the count matches the bullets.
---
Outside diff comments:
In `@kits/negotiation-coach/constitutions/default.md`:
- Around line 1-21: The Markdown headings in the Default Constitution template
are missing required blank lines, causing MD022 failures. Update the source
template in default.md so each section heading under the Identity, Safety, Data
Handling, and Tone blocks is separated by the proper blank line spacing, keeping
the templated/auto-generated source lint-clean for future kits.
In `@kits/negotiation-coach/README.md`:
- Around line 3-152: The README Markdown needs normalization to satisfy the lint
warnings MD022, MD031, and MD029. Clean up the heading separation in the main
sections, ensure fenced code blocks have proper blank-line spacing before and
after them, and fix the ordered-list formatting in the Quickstart steps so
numbering is consistent and lint-safe. Use the existing section headings like
Overview, Quickstart, and Common Failure Modes to locate and adjust the
formatting without changing the content.
🪄 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: 640903d0-fca8-40d9-ae7e-3db0a671fce5
📒 Files selected for processing (9)
kits/negotiation-coach/.gitignorekits/negotiation-coach/README.mdkits/negotiation-coach/agent.mdkits/negotiation-coach/constitutions/default.mdkits/negotiation-coach/flows/negotiation-coach.tskits/negotiation-coach/lamatic.config.tskits/negotiation-coach/model-configs/negotiation-coach_generate-text.tskits/negotiation-coach/prompts/negotiation-coach_generate-text_system.mdkits/negotiation-coach/prompts/negotiation-coach_generate-text_user.md
|
Hi @rajputanuj31! 👋 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! 🙏 |
Addressed all issues |
🎯 Problem Statement
Most people enter high-stakes negotiations (salary reviews, vendor contracts, freelance rates) unprepared. They lack a structured strategy, don't know how to frame their ask psychologically, and get caught off-guard by predictable pushbacks. There is no affordable alternative between hiring a professional negotiation coach and reading generic internet articles.
🛠️ What This PR Adds
This PR introduces the Negotiation Coach, a single-flow template that solves this problem. It acts as an AI-powered negotiation strategist grounded in principled negotiation and BATNA theory.
Users provide a plain-text description of their negotiation scenario, and the flow returns a complete, tailored playbook including:
This submission is for the Lamatic AgentKit Challenge.
PR Checklist
1. Select Contribution Type
kits/<category>/<kit-name>/)bundles/<bundle-name>/)kits/negotiation-coach/) (Note: Directory is flat per CLAUDE.md)2. General Requirements
kebab-caseand matches the flow IDREADME.md(purpose, setup, usage)3. File Structure
lamatic.config.tspresent with valid metadata (name, description, tags, steps, author, links)agent.mdidentity and capability document is presentconstitutions/default.mdguardrails are presentflows/are.tsfiles (not folders)@referencepaths (prompts, model-configs) are valid and resolve correctly.env.exampleneeded (template type has no apps/ or env vars)4. Validation
feat:to trigger GitHub Actionsvalidate-pr.yml) passed with 0 errorskits/negotiation-coach/AgentKit template (single-shot “Negotiation Coach”) for generating a structured negotiation playbook from a plain-textscenario.kits/negotiation-coach/lamatic.config.tsto register the template metadata (name/description/version/tags), author info, and a single required step (negotiation-coach).kits/negotiation-coach/flows/negotiation-coach.tsdefining the flow graph (API trigger → LLM generation → GraphQL response mapping):triggerNode(nodeId: graphqlNode) as the realtime API entrypoint, exposing the incomingscenario.dynamicNode(nodeId: LLMNode) that runs the configured LLM with:@prompts/negotiation-coach_generate-text_system.md@prompts/negotiation-coach_generate-text_user.md(injects thescenario)@model-configs/negotiation-coach_generate-text.tsgeneratedResponse.dynamicNode(nodeId: graphqlResponseNode) that mapsstrategyto{{LLMNode_201.output.generatedResponse}}.defaultEdge(trigger → LLM → response) and aresponseEdge(trigger to response) for realtime delivery.kits/negotiation-coach/model-configs/negotiation-coach_generate-text.tsfor the LLM model config used by the flow.kits/negotiation-coach/prompts/negotiation-coach_generate-text_system.md(system prompt enforcing the fixed markdown playbook structure and guardrails/disclaimer).kits/negotiation-coach/prompts/negotiation-coach_generate-text_user.md(injects{{triggerNode_1.output.scenario}}as the “Negotiation Scenario”.kits/negotiation-coach/constitutions/default.mdas the default constitution (identity + safety/privacy/tone requirements, including refusal guardrails and “not legal/financial advice” framing).kits/negotiation-coach/agent.mddocumenting the single-flow input/output contract, constraints, and example GraphQL usage.kits/negotiation-coach/README.mddocumenting the template, GraphQL mutation example, expected response structure, guardrails, and common failure modes.kits/negotiation-coach/.gitignore(ignores.lamatic/,node_modules/, and.env/.env.local).