feat: add data quality issue detector kit#276
Conversation
WalkthroughChangesThe kit adds a Lamatic data-quality workflow and a Next.js interface for entering CSV data, previewing rows, requesting analysis, and displaying formatted reports with setup documentation and runtime configuration. Data Quality Detector
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-20T12:46:33Z 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: 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/dq-issue-detector/apps/actions/orchestrate.ts`:
- Around line 1-10: Update orchestrateAnalysis to import ../../lamatic.config
and use its flow step definitions before executing the Lamatic flow request.
Replace the current placeholder return with the configured extraction sequence,
while preserving the existing required-file validation.
In `@kits/dq-issue-detector/apps/app/globals.css`:
- Line 64: Replace the invalid `rounded` declaration in the `.prose code` rule
with the standard `border-radius` property while preserving its existing
`0.25rem` value and all other declarations.
In `@kits/dq-issue-detector/apps/app/page.tsx`:
- Line 182: Replace outline-none with outline-hidden on the textarea at
kits/dq-issue-detector/apps/app/page.tsx lines 182-182 and the input field at
lines 195-195, preserving all other classes.
- Around line 29-35: Refactor the form in the Home component to use shadcn/ui
components and react-hook-form with a zod schema for validation instead of raw
form controls and primitive field state. Preserve the existing submission,
analysis, error, and copy behaviors while routing field values and validation
through the form setup.
- Line 16: Align the payload orchestration contract across all affected sites:
in kits/dq-issue-detector/apps/app/page.tsx:16-16, import the actual exported
orchestrateAnalysis function (or update the upstream export); in
kits/dq-issue-detector/apps/app/page.tsx:92-92, invoke it with the required
FormData payload instead of raw strings; and in
kits/dq-issue-detector/README.md:64-79, update programmatic usage to document
orchestrateAnalysis and the FormData structure.
In `@kits/dq-issue-detector/apps/package.json`:
- Line 27: Remove the obsolete autoprefixer dev dependency from
kits/dq-issue-detector/apps/package.json at lines 27-27 and remove the
autoprefixer plugin from kits/dq-issue-detector/apps/postcss.config.mjs at lines
4-4, leaving the remaining PostCSS configuration intact.
🪄 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: 279b8723-40ae-4278-8cd2-c0daa8a5dabd
⛔ Files ignored due to path filters (2)
kits/dq-issue-detector/apps/package-lock.jsonis excluded by!**/package-lock.jsonkits/dq-issue-detector/assets/sample-dataset.csvis excluded by!**/*.csv
📒 Files selected for processing (21)
kits/dq-issue-detector/.env.examplekits/dq-issue-detector/.gitignorekits/dq-issue-detector/README.mdkits/dq-issue-detector/agent.mdkits/dq-issue-detector/apps/.env.examplekits/dq-issue-detector/apps/.gitignorekits/dq-issue-detector/apps/actions/orchestrate.tskits/dq-issue-detector/apps/app/globals.csskits/dq-issue-detector/apps/app/layout.tsxkits/dq-issue-detector/apps/app/page.tsxkits/dq-issue-detector/apps/lib/lamatic-client.tskits/dq-issue-detector/apps/next-env.d.tskits/dq-issue-detector/apps/next.config.mjskits/dq-issue-detector/apps/package.jsonkits/dq-issue-detector/apps/postcss.config.mjskits/dq-issue-detector/apps/tailwind.config.tskits/dq-issue-detector/apps/tsconfig.jsonkits/dq-issue-detector/constitutions/default.mdkits/dq-issue-detector/flows/data-quality-agent.tskits/dq-issue-detector/lamatic.config.tskits/dq-issue-detector/prompts/data-quality_analysis.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/dq-issue-detector/apps/app/page.tsx`:
- Around line 92-96: The custom instructions state is not included in the
analysis request or accepted by the underlying flow. Update handleAnalyze and
orchestrateAnalysis to propagate instructions through FormData and action
parsing, then add it to the data-quality-agent flow inputs and use the
established value; alternatively remove the instructions state and UI field
entirely.
🪄 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: c4cab809-4b56-49b3-a195-b16d911f044e
📒 Files selected for processing (5)
kits/dq-issue-detector/apps/actions/orchestrate.tskits/dq-issue-detector/apps/app/page.tsxkits/dq-issue-detector/flows/data-quality-agent.tskits/dq-issue-detector/scripts/data-quality-extract.tskits/dq-issue-detector/scripts/data-quality-format.ts
| const formData = new FormData(); | ||
| const csvFile = new File([csvContent], "dataset.csv", { type: "text/csv" }); | ||
| formData.append("file", csvFile); | ||
|
|
||
| const res = await orchestrateAnalysis(formData); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Mission Compromised: Abandoned Intel (instructions).
Agent, you're gathering critical intel from the field but leaving it at the drop site. The custom instructions state is completely ignored during the payload dispatch in handleAnalyze. Furthermore, central intelligence (your flow definition in data-quality-agent.ts) doesn't even accept an instructions parameter.
Your mission, should you choose to accept it, is to either plumb this data all the way through (updating your FormData, orchestrateAnalysis action, and flow inputs), or scrub the field entirely from this UI to avoid confusing our operatives.
🤖 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/dq-issue-detector/apps/app/page.tsx` around lines 92 - 96, The custom
instructions state is not included in the analysis request or accepted by the
underlying flow. Update handleAnalyze and orchestrateAnalysis to propagate
instructions through FormData and action parsing, then add it to the
data-quality-agent flow inputs and use the established value; alternatively
remove the instructions state and UI field entirely.
|
Hi @donallsiby! 👋 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>)Added
kits/dq-issue-detector/.env.example(Lamatic API placeholders +DATA_QUALITY_AGENTflow id).Added
kits/dq-issue-detector/.gitignore(ignores.lamatic/,node_modules/, local env files).Added
kits/dq-issue-detector/README.md,kits/dq-issue-detector/agent.md.Added
kits/dq-issue-detector/constitutions/default.md(evidence-based, concise output guidance).Added
kits/dq-issue-detector/prompts/data-quality_analysis.md(quality score + issue-by-issue explanations/severity/fixes + business impact).Added
kits/dq-issue-detector/lamatic.config.ts(kit config with adata-quality-agentworkflow step usingFLOW_ID).Added
kits/dq-issue-detector/flows/data-quality-agent.tsdefining the flow:fileaccepted types.csvand.xlsxextract_data(script) →analyze_quality(llm) →format_report(script)extract_data → analyze_quality → format_reportllmprompt and the two script nodes.Added
kits/dq-issue-detector/scripts/data-quality-extract.tsandkits/dq-issue-detector/scripts/data-quality-format.ts.Added
kits/dq-issue-detector/assets/sample-dataset.csv.Added
kits/dq-issue-detector/apps/.env.exampleandkits/dq-issue-detector/apps/.gitignore.Added Next.js app:
apps/actions/orchestrate.ts(server action to upload a dataset file, resolve workflow id fromlamatic.config.ts/env fallbacks, execute the Lamatic GraphQL workflow, and return{ success, data|error }).apps/lib/lamatic-client.ts(GraphQLfetchclient with env-based configuration, timeout, and error handling).apps/app/page.tsx(CSV paste/input UI + sample, preview, run analysis viaorchestrateAnalysis, render/copy Markdown report).apps/app/layout.tsx,apps/app/globals.css(layout + styling).apps/package.json,apps/package-lock.json,apps/next.config.mjs,apps/postcss.config.mjs,apps/tailwind.config.ts,apps/tsconfig.json,apps/next-env.d.ts.