feat: added compliance copilot kit#257
Conversation
|
Warning Review limit reached
Next review available in: 31 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 (7)
WalkthroughChangesThe Compliance Copilot kit adds a Lamatic compliance-audit flow with structured JSON output, supporting prompts and model configuration, and a Next.js interface for submitting documents and guidelines and displaying audit findings. Compliance Copilot
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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. |
|
Failure recorded at 2026-07-16T10:21:11Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed. |
There was a problem hiding this comment.
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/compliance-copilot/apps/src/app/globals.css`:
- Around line 8-26: Update the `@theme` inline typography variables to reference
the Inter font CSS variables provided by the Next.js layout instead of the
unavailable Geist variables, and remove the hardcoded Arial/Helvetica
font-family from body so typography consistently uses the deployed Inter
configuration.
In `@kits/compliance-copilot/apps/src/app/layout.tsx`:
- Around line 5-19: Update the Inter configuration in RootLayout’s module scope
to export a CSS variable, then apply that variable and Tailwind’s default sans
class to the body className alongside the existing Inter class. Preserve the
current metadata and child rendering.
In `@kits/compliance-copilot/constitutions/default.md`:
- Around line 1-17: Fix the heading and section spacing in the central template
generator that produces the default constitution, rather than editing the
generated default.md directly. Ensure consistent blank lines around all headings
and between sections so regenerated kits inherit the corrected Markdown
formatting.
In `@kits/compliance-copilot/flows/compliance-audit.ts`:
- Line 74: The JSON schema configured on the InstructorLLMNode currently
describes one compliance result object instead of the required collection.
Update the schema’s root type to an array and define its item schema with the
existing requirement, status, analysis, and remediation string properties,
preserving those fields for every returned object.
In `@kits/compliance-copilot/README.md`:
- Around line 73-74: Update the fenced file-tree code block in the README to
specify a plaintext-compatible language identifier, such as plaintext or text,
while preserving its existing contents.
🪄 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: c979b51d-98be-4f03-84f0-32c53669f3c1
⛔ Files ignored due to path filters (7)
kits/compliance-copilot/apps/package-lock.jsonis excluded by!**/package-lock.jsonkits/compliance-copilot/apps/public/file.svgis excluded by!**/*.svgkits/compliance-copilot/apps/public/globe.svgis excluded by!**/*.svgkits/compliance-copilot/apps/public/next.svgis excluded by!**/*.svgkits/compliance-copilot/apps/public/vercel.svgis excluded by!**/*.svgkits/compliance-copilot/apps/public/window.svgis excluded by!**/*.svgkits/compliance-copilot/apps/src/app/favicon.icois excluded by!**/*.ico
📒 Files selected for processing (20)
kits/compliance-copilot/.env.examplekits/compliance-copilot/.gitignorekits/compliance-copilot/README.mdkits/compliance-copilot/agent.mdkits/compliance-copilot/apps/eslint.config.mjskits/compliance-copilot/apps/next.config.tskits/compliance-copilot/apps/package.jsonkits/compliance-copilot/apps/postcss.config.mjskits/compliance-copilot/apps/src/actions/orchestrate.tskits/compliance-copilot/apps/src/app/globals.csskits/compliance-copilot/apps/src/app/layout.tsxkits/compliance-copilot/apps/src/app/page.tsxkits/compliance-copilot/apps/src/lib/lamatic-client.tskits/compliance-copilot/apps/tsconfig.jsonkits/compliance-copilot/constitutions/default.mdkits/compliance-copilot/flows/compliance-audit.tskits/compliance-copilot/lamatic.config.tskits/compliance-copilot/model-configs/compliance-audit_instructor-llmnode-286_generative-model-name.tskits/compliance-copilot/prompts/compliance-audit_instructor-llmnode-286_system_0.mdkits/compliance-copilot/prompts/compliance-audit_instructor-llmnode-286_user_1.md
|
Hi @vk2git! 👋 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! 🙏 |
PR Checklist
1. Select Contribution Type
kits/<category>/<kit-name>/)bundles/<bundle-name>/)templates/<template-name>/)2. General Requirements
kebab-caseand matches the flow IDREADME.md(purpose, setup, usage)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/compliance-copilot/, including:README.md+agent.mdwith setup/run instructions, required env vars (LAMATIC_API_URL,LAMATIC_PROJECT_ID,LAMATIC_API_KEY,COMPLIANCE_AUDIT), and integration notes.lamatic.config.tswith kit metadata and a mandatorycompliance-auditstep.constitutions/default.mddefining baseline safety/data-handling/tone rules.prompts/(compliance-audit_instructor-llmnode-286_system_0.md,..._user_1.md) to audit an input document against provided guidelines and return JSON-only output.model-configs/(compliance-audit_instructor-llmnode-286_generative-model-name.ts) with placeholder model/provider/credential configuration.flows/compliance-audit.tsdefining the compliance audit flow:triggerNode(triggerNode_1) configured asgraphqlNodeacceptingdocumentText: stringandguidelines: string.dynamicNode(InstructorLLMNode_286) running anInstructorLLMNodewith:{ requirement, status, analysis, remediation },responseNode(responseNode_triggerNode_1) withoutputMappingwiring{{InstructorLLMNode_286.output}}into the flow response.triggerNode_1 -> InstructorLLMNode_286(defaultEdge),InstructorLLMNode_286 -> responseNode_triggerNode_1(defaultEdge), plus theresponseEdgefromtriggerNode_1to the response node.kits/compliance-copilot/.env.exampleandapps/.env.examplewith placeholder values for endpoint/project key and theCOMPLIANCE_AUDITflow id.kits/compliance-copilot/.gitignoreto ignore common build artifacts, env files, and dependency outputs.kits/compliance-copilot/apps/:package.json,tsconfig.json,next.config.ts,eslint.config.mjs,postcss.config.mjs,src/app/globals.css.src/app/layout.tsx(metadata + root layout) andsrc/app/page.tsx(“Compliance Copilot” page) to:COMPLIANCE_AUDITflow,_meta, ensure findings are an array) and render findings + remediation (or show raw JSON on unexpected shapes).src/lib/lamatic-client.tsexporting a configuredLamaticclient from env vars.src/actions/orchestrate.tsaddingcheckCompliance(documentText, guidelines)which validatesCOMPLIANCE_AUDIT, executes the flow, and returns{ success, data | error }.