Skip to content

feat: Add negotiation-coach template#188

Open
rajputanuj31 wants to merge 3 commits into
Lamatic:mainfrom
rajputanuj31:feat/negotiation-coach
Open

feat: Add negotiation-coach template#188
rajputanuj31 wants to merge 3 commits into
Lamatic:mainfrom
rajputanuj31:feat/negotiation-coach

Conversation

@rajputanuj31

@rajputanuj31 rajputanuj31 commented Jul 7, 2026

Copy link
Copy Markdown

🎯 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:

  • 🧠 Psychological framing strategy
  • 💬 Word-for-word opening script
  • 🔄 Table of anticipated objections and responses
  • 🚪 BATNA analysis and walk-away point
  • ⚠️ Scenario-specific traps to avoid

This submission is for the Lamatic AgentKit Challenge.

PR Checklist

1. Select Contribution Type

  • Kit (kits/<category>/<kit-name>/)
  • Bundle (bundles/<bundle-name>/)
  • Template (kits/negotiation-coach/) (Note: Directory is flat per CLAUDE.md)

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
  • All changes are documented in README.md (purpose, setup, usage)

3. File Structure

  • lamatic.config.ts present with valid metadata (name, description, tags, steps, author, links)
  • agent.md identity and capability document is present
  • constitutions/default.md guardrails are present
  • All flows in flows/ are .ts files (not folders)
  • All @reference paths (prompts, model-configs) are valid and resolve correctly
  • No .env.example needed (template type has no apps/ or env vars)

4. Validation

  • PR title is clear and starts with feat: to trigger GitHub Actions
  • Local validation script (mimicking validate-pr.yml) passed with 0 errors
  • No unrelated files or projects are modified
  • Added new kits/negotiation-coach/ AgentKit template (single-shot “Negotiation Coach”) for generating a structured negotiation playbook from a plain-text scenario.
  • Added kits/negotiation-coach/lamatic.config.ts to register the template metadata (name/description/version/tags), author info, and a single required step (negotiation-coach).
  • Added kits/negotiation-coach/flows/negotiation-coach.ts defining the flow graph (API trigger → LLM generation → GraphQL response mapping):
    • triggerNode (nodeId: graphqlNode) as the realtime API entrypoint, exposing the incoming scenario.
    • dynamicNode (nodeId: LLMNode) that runs the configured LLM with:
      • system prompt ref: @prompts/negotiation-coach_generate-text_system.md
      • user prompt ref: @prompts/negotiation-coach_generate-text_user.md (injects the scenario)
      • model config ref: @model-configs/negotiation-coach_generate-text.ts
      • emits generatedResponse.
    • dynamicNode (nodeId: graphqlResponseNode) that maps strategy to {{LLMNode_201.output.generatedResponse}}.
    • Edges include defaultEdge (trigger → LLM → response) and a responseEdge (trigger to response) for realtime delivery.
  • Added kits/negotiation-coach/model-configs/negotiation-coach_generate-text.ts for the LLM model config used by the flow.
  • Added kits/negotiation-coach/prompts/negotiation-coach_generate-text_system.md (system prompt enforcing the fixed markdown playbook structure and guardrails/disclaimer).
  • Added kits/negotiation-coach/prompts/negotiation-coach_generate-text_user.md (injects {{triggerNode_1.output.scenario}} as the “Negotiation Scenario”.
  • Added kits/negotiation-coach/constitutions/default.md as the default constitution (identity + safety/privacy/tone requirements, including refusal guardrails and “not legal/financial advice” framing).
  • Added kits/negotiation-coach/agent.md documenting the single-flow input/output contract, constraints, and example GraphQL usage.
  • Added kits/negotiation-coach/README.md documenting the template, GraphQL mutation example, expected response structure, guardrails, and common failure modes.
  • Added kits/negotiation-coach/.gitignore (ignores .lamatic/, node_modules/, and .env / .env.local).

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Pro

Run ID: e50b35d6-0ba2-4be8-9f66-46606477cf26

📥 Commits

Reviewing files that changed from the base of the PR and between 0acb51f and b648ba8.

📒 Files selected for processing (3)
  • kits/negotiation-coach/README.md
  • kits/negotiation-coach/agent.md
  • kits/negotiation-coach/constitutions/default.md

Walkthrough

This PR adds a new “Negotiation Coach” AgentKit template with flow wiring, prompts, model config, governance, and user-facing documentation.

Changes

Negotiation Coach Kit

Layer / File(s) Summary
Template config and scaffolding
kits/negotiation-coach/.gitignore, kits/negotiation-coach/lamatic.config.ts
Adds ignore rules for Lamatic, Node modules, and local env files, plus template metadata, step definition, and repository link.
Flow definition, model config, and prompts
kits/negotiation-coach/flows/negotiation-coach.ts, kits/negotiation-coach/model-configs/negotiation-coach_generate-text.ts, kits/negotiation-coach/prompts/*
Defines the GraphQL-triggered flow, wires the model config and prompt templates, and maps generated strategy output to the response.
Default constitution and guardrails
kits/negotiation-coach/constitutions/default.md
Adds identity, safety, data-handling, and tone rules for the template’s responses.
README and agent documentation
kits/negotiation-coach/README.md, kits/negotiation-coach/agent.md
Documents the flow contract, output structure, setup, quickstart, failure modes, and template metadata.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, clear, and accurately summarizes the new negotiation-coach template.
Description check ✅ Passed The description covers the problem, solution, checklist, and validation, with only minor template-specific wording differences.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 Jul 7, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/negotiation-coach

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: 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 win

Clean 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.md is 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 win

Normalize 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

📥 Commits

Reviewing files that changed from the base of the PR and between dafde4c and 0acb51f.

📒 Files selected for processing (9)
  • kits/negotiation-coach/.gitignore
  • kits/negotiation-coach/README.md
  • kits/negotiation-coach/agent.md
  • kits/negotiation-coach/constitutions/default.md
  • kits/negotiation-coach/flows/negotiation-coach.ts
  • kits/negotiation-coach/lamatic.config.ts
  • kits/negotiation-coach/model-configs/negotiation-coach_generate-text.ts
  • kits/negotiation-coach/prompts/negotiation-coach_generate-text_system.md
  • kits/negotiation-coach/prompts/negotiation-coach_generate-text_user.md

Comment thread kits/negotiation-coach/agent.md
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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:

  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! 🙏

@rajputanuj31

Copy link
Copy Markdown
Author

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:

  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! 🙏

Addressed all issues

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