feat: Add insurance-jargon-translator template#256
Conversation
|
Warning Review limit reached
Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughChangesThe Insurance Jargon Translator kit adds documented translation behavior, guardrails, structured JSON output, a Gemini-backed LLM flow, API request/response wiring, and Lamatic kit metadata. Insurance Jargon Translator
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: 6
🤖 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/insurance-jargon-translator/agent.md`:
- Line 40: Add a trailing newline at the end of agent.md to satisfy Markdownlint
rule MD047, without changing the document content.
- Line 32: Align the category contract across agent.md, README.md, the system
prompt, and all consumers: choose one supported category enum and one
invalid-input representation, then update every classification list, example,
validation path, and non-insurance response consistently. Ensure the documented
four-category objective, `other` handling, and empty-category behavior no longer
conflict.
In `@kits/insurance-jargon-translator/constitutions/default.md`:
- Around line 3-25: Update the template source that generates the insurance
jargon translator constitution, adding blank lines around all Markdown headings
and ensuring the generated content ends with a newline. Regenerate
kits/insurance-jargon-translator/constitutions/default.md from that source,
rather than editing only the generated artifact.
In `@kits/insurance-jargon-translator/flows/insurance-jargon-translator.ts`:
- Around line 104-106: Update the API Response node’s outputMapping in the
insurance-jargon-translator flow to extract and forward the generatedResponse
field instead of using an empty mapping. Preserve the existing node
configuration and ensure the LLM-generated response reaches the output.
In
`@kits/insurance-jargon-translator/prompts/insurance-jargon-translator_llmnode-601_system_0.md`:
- Around line 1-11: Resolve the Markdownlint violations in the prompt while
preserving its instructions and output semantics: configure an appropriate lint
exception for prompt files, or add a harmless top-level heading without altering
the prompt behavior, and ensure the file ends with a final newline. Keep the
existing Insurance Jargon Translator content unchanged apart from the necessary
lint-related adjustment.
In `@kits/insurance-jargon-translator/README.md`:
- Around line 24-31: Add blank lines immediately before and after the fenced
JSON example in the README to satisfy MD031, and ensure the document ends with
exactly one trailing newline to satisfy MD047. Preserve the example content and
surrounding documentation.
🪄 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: e41cf69e-4991-40c2-b495-24b98bfe5959
📒 Files selected for processing (9)
kits/insurance-jargon-translator/.gitignorekits/insurance-jargon-translator/README.mdkits/insurance-jargon-translator/agent.mdkits/insurance-jargon-translator/constitutions/default.mdkits/insurance-jargon-translator/flows/insurance-jargon-translator.tskits/insurance-jargon-translator/lamatic.config.tskits/insurance-jargon-translator/model-configs/insurance-jargon-translator_llmnode-601_generative-model-name.tskits/insurance-jargon-translator/prompts/insurance-jargon-translator_llmnode-601_system_0.mdkits/insurance-jargon-translator/prompts/insurance-jargon-translator_llmnode-601_user_1.md
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 (2)
kits/insurance-jargon-translator/README.md (1)
36-36: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winDescribe the graph accurately.
This is not a single-node flow: it contains API Request, Generate Text, and API Response nodes. Describe it as a three-node flow with one LLM processing node.
🤖 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/insurance-jargon-translator/README.md` at line 36, Update the flow description to identify it as a three-node flow containing API Request, Generate Text (the single LLM processing node), and API Response, while preserving the existing input and structured JSON output details.kits/insurance-jargon-translator/flows/insurance-jargon-translator.ts (1)
57-57: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winEnforce the documented single-clause boundary.
The trigger still accepts any string, so full-policy or multi-clause payloads can reach the LLM even though this kit is meant for one clause at a time. Add trigger-side validation or an explicit refusal path.🤖 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/insurance-jargon-translator/flows/insurance-jargon-translator.ts` at line 57, Add trigger-side validation for the “advance_schema” policy_clause input so only a single clause is accepted before invoking the LLM. Reject or explicitly refuse full-policy and multi-clause payloads, while preserving the existing flow for valid single-clause input.
🤖 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/insurance-jargon-translator/flows/insurance-jargon-translator.ts`:
- Line 57: Add trigger-side validation for the “advance_schema” policy_clause
input so only a single clause is accepted before invoking the LLM. Reject or
explicitly refuse full-policy and multi-clause payloads, while preserving the
existing flow for valid single-clause input.
In `@kits/insurance-jargon-translator/README.md`:
- Line 36: Update the flow description to identify it as a three-node flow
containing API Request, Generate Text (the single LLM processing node), and API
Response, while preserving the existing input and structured JSON output
details.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4b701745-25ef-4ced-9b8e-276fbcef43c3
📒 Files selected for processing (6)
kits/insurance-jargon-translator/README.mdkits/insurance-jargon-translator/agent.mdkits/insurance-jargon-translator/constitutions/default.mdkits/insurance-jargon-translator/flows/insurance-jargon-translator.tskits/insurance-jargon-translator/prompts/insurance-jargon-translator_llmnode-601_system_0.mdkits/insurance-jargon-translator/prompts/insurance-jargon-translator_llmnode-601_user_1.md
|
Hi @sakthee30! 👋 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! 🙏 |
|
Hi! All CodeRabbit feedback has been addressed across two rounds of fixes:
CodeRabbit has approved the latest changes. Ready for maintainer review whenever convenient — thank you! |
What This Adds
Insurance Jargon Translator — a template that takes a single insurance policy clause and translates it into plain English, along with its category (exclusion/condition/definition/limit), a concrete example scenario, and a brief explanation of why the clause exists.
Problem: Insurance policy language is dense and hard to understand at exactly the moment people need clarity most — when filing a claim or checking coverage.
Approach: A single-node flow (API Request → Generate Text → API Response) with a system prompt engineered to produce structured, guardrailed output — explicitly avoiding legal advice or claim-outcome predictions.
Result: Tested against multiple clause types (exclusions and conditions); both correctly classified with accurate plain-English explanations and realistic examples.
Tradeoffs: Single-clause input only, no full-document support; categorization is best-effort LLM classification, not a legal determination.
PR Checklist
1. Select Contribution Type
kits/<category>/<kit-name>/)bundles/<bundle-name>/)kits/insurance-jargon-translator/, nottemplates/, per the latest CONTRIBUTING.md)2. General Requirements
kebab-caseand matches the flow IDREADME.md(purpose, setup, usage)(Note: This section reflects an older
config.json-based structure. This PR follows the current CONTRIBUTING.md structure usinglamatic.config.ts,flows/<name>.ts,prompts/,model-configs/, andconstitutions/— all present in the kit folder.)3. File Structure (Check what applies)
config.jsonpresent with valid metadata (name, description, tags, steps, author, env keys)flows/<flow-name>/(where applicable) include:config.json(Lamatic flow export)inputs.jsonmeta.jsonREADME.md.env.examplewith placeholder values only (kits only)config.jsonnode graphs (changes via Lamatic Studio export)4. Validation
npm install && npm run devworks locally (kits: UI runs; bundles/templates: flows are valid)[kit] Add <name> for <use case>)kits/insurance-jargon-translator/kit:.gitignore(ignores.lamatic/,node_modules/,.env,.env.local)README.md(template purpose, request/response contract, architecture, guardrails/limitations, example usage)agent.md(agent definition, structured JSON output schema, constraints)constitutions/default.md(safety/behavior guardrails; avoids legal advice/claim predictions, handles uncertain input safely)lamatic.config.ts(kit metadata + single step pointing toinsurance-jargon-translator)flow.jsonfound; flow is defined inflows/insurance-jargon-translator.ts):flows/insurance-jargon-translator.tstriggerNode_1(triggerNode): GraphQL API Request withadvance_schemarequiringpolicy_clause: stringLLMNode_601(dynamicNode): Generate Text using system/user prompts and the configured generative modelresponseNode_triggerNode_1(responseNode): API Response mappingresultfromLLMNode_601.output.generatedResponseas JSONtriggerNode_1→LLMNode_601(defaultEdge)LLMNode_601→responseNode_triggerNode_1(defaultEdge)triggerNode_1→responseNode_triggerNode_1(responseEdge)model-configs/insurance-jargon-translator_llmnode-601_generative-model-name.ts(Gemini model config forllmnode-601)prompts/insurance-jargon-translator_llmnode-601_system_0.md(JSON-only output; translates one clause; best-effort category; no legal advice/claim-outcome predictions)prompts/insurance-jargon-translator_llmnode-601_user_1.md(injectspolicy_clausefrom the trigger into the user prompt)