feat: Add eda-analyst kit - #319
Conversation
|
Warning Review limit reached
Next review available in: 20 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 Plus Run ID: 📒 Files selected for processing (1)
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe PR adds an EDA Analyst kit. It profiles and cleans CSV data, validates and executes analysis plans, generates dashboards, and exposes the workflow through a Next.js application with setup documentation. ChangesEDA Analyst
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. |
There was a problem hiding this comment.
Actionable comments posted: 21
🤖 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/eda-analyst/.gitignore`:
- Around line 3-4: Update the environment-file ignore rules in
kits/eda-analyst/.gitignore (lines 3-4) and kits/eda-analyst/apps/.gitignore
(lines 14-17) to use the broad .env* pattern, while explicitly allowing
.env.example with !.env.example in both files.
In `@kits/eda-analyst/agent.md`:
- Around line 11-15: Update the “Processing (three guarded stages)” heading in
the pipeline description to state “four guarded stages,” leaving the Profile,
Sanitize, Analyze, and Visualize stage descriptions unchanged.
In `@kits/eda-analyst/apps/actions/orchestrate.ts`:
- Around line 11-22: Update analyze to import ../../lamatic.config and resolve
the workflow step definition from that config instead of reading EDA_ANALYST
directly from process.env. Use the configured step’s flow identifier when
executing the GraphQL workflow, while preserving the existing API URL, project
ID, and API key handling.
- Around line 32-43: Update the direct fetch call in the action to pass an
AbortSignal.timeout deadline, then check res.ok before calling res.json(). For
non-success responses, throw a clear request error without attempting JSON
parsing; preserve JSON parsing only for successful responses.
- Around line 27-29: Strengthen URL validation in the orchestration handler
before the server-side fetch: resolve the hostname and reject loopback, private,
link-local, metadata, and other non-public network targets, including redirects
if the HTTP client follows them. Also require the URL path or response content
type to identify a CSV, while preserving the existing invalid-input error
response and fetch flow for valid public CSV URLs.
In `@kits/eda-analyst/apps/app/page.tsx`:
- Around line 68-84: Update the AnalyzeResult handling in the page component to
explicitly cover incomplete results: failed responses must display a fallback
message when res.error is absent, and successful responses must display a
fallback when res.dashboardHtml is absent instead of silently rendering nothing.
Prefer defining a discriminated success/error union for AnalyzeResult and keep
the existing dashboard rendering only for successful results with dashboardHtml.
- Around line 45-60: Update the input in the page component to provide a
programmatic accessible name via a label or aria-label, and replace each
clickable sample span rendered by SAMPLES.map with a keyboard-accessible button
type="button" while preserving its setUrl behavior and styling.
- Around line 17-23: Update run() to validate the trimmed URL before submitting,
handle both rejected and thrown analyze() failures without leaving the UI stuck,
and move setLoading(false) into a finally block so loading always resets.
Preserve the existing result reset and successful setRes flow.
- Line 20: Harden the URL handling around analyze() by parsing fileUrl and
rejecting non-public schemes before the workflow is contacted; resolve the
hostname and reject loopback, private, link-local, and cloud-metadata
destinations, revalidating every redirect target. Add bounded request timeouts
and response-size limits, and ensure the existing analyze() flow proceeds only
after all URL and network checks pass.
- Around line 43-84: Replace the page’s useState-driven native form and
handwritten styling with the mandated Tailwind CSS v4+, shadcn/ui,
react-hook-form with zod validation, and lucide-react UI stack. Update the form
and submit flow around the visible URL input, Analyze button, loading state, and
sample controls while preserving their existing behavior, and add the required
dependencies and configuration for these packages.
In `@kits/eda-analyst/flows/eda-analyst.ts`:
- Around line 146-174: The duplicated buildProfile implementations in
eda-analyst_code-node-941_code.ts and eda-analyst_code-node-781_code.ts must
remain synchronized. Add matching comments to both scripts identifying them as a
mirrored pair and explicitly naming the authoritative file; if the runtime
supports shared script references, replace the duplicate with a reference to the
authoritative script.
- Around line 87-129: Update the extractFromFileNode_202 configuration in the
eda-analyst flow to replace maxRows "0" with a finite default CSV row limit.
Preserve the existing extraction settings and choose a limit that bounds payload
size before profiling and analysis.
In `@kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-400_system_0.md`:
- Line 1: Restrict ID-based dropping to columns explicitly identified by a
name-matched or non-continuous profile signal, not isLikelyId=true alone. Update
the drop guidance in
kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-400_system_0.md:1 and
the analysis-exclusion guidance in
kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_system_0.md:12, and
apply the same tightened heuristic in both profiling copies,
kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts and
kits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts, so continuous
all-distinct numeric columns remain eligible.
In `@kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_user_1.md`:
- Line 1: Update
kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_user_1.md: put
{{codeNode_458.output.profile}} on its own line and place “Plan the analysis
tasks.” on the following line. Update
kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-832_user_1.md: add a
newline after “titles:” so {{batchNode_695.output.currentValue}} begins on its
own line.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-159_code.ts`:
- Around line 36-42: Update the compare result construction around keys, data,
and the returned summary to handle keys.length === 0 before accessing keys[0] or
the final data element. Return an explicit no-data finding in that case,
including an empty chart payload as appropriate, while preserving the existing
chart and summary behavior for non-empty groups.
- Around line 69-71: Ensure failed analyses produced by the catch block in
kits/eda-analyst/scripts/eda-analyst_code-node-159_code.ts at lines 69-71 set
error to String(e) while retaining a user-readable summary. Keep the existing
f.error check unchanged in
kits/eda-analyst/scripts/eda-analyst_code-node-706_code.ts at line 8; it
requires no direct modification.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-396_code.ts`:
- Line 70: Update the script-data construction around SPECS so the serialized
specs are safe for embedding in an HTML script block: escape literal “<”
characters and JavaScript line-separator characters U+2028 and U+2029 after
JSON.stringify and before concatenation. Preserve valid JSON parsing and the
existing dashboard behavior while preventing CSV-controlled values from
terminating the script element.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-443_code.ts`:
- Line 22: Update the deduplication key in the add function to include t.agg
alongside the existing task fields, ensuring tasks with different aggregations
such as mean and sum are retained as distinct analyses.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-629_code.ts`:
- Line 21: Guard the late-stage upstream outputs before property access: in
kits/eda-analyst/scripts/eda-analyst_code-node-629_code.ts lines 21-21, assign
chunker to a fallback object such as ch and read dedupe fields from ch; in
kits/eda-analyst/scripts/eda-analyst_code-node-458_code.ts lines 36-37, assign
applied to a fallback object such as app and read profile, cleanedRows, and
changelog from app.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts`:
- Around line 33-37: Update the row construction in the map callback to use a
null-prototype object, or explicitly skip the dangerous __proto__, constructor,
and prototype keys during source copying. Ensure copied CSV columns still flow
through imputation and downstream processing without allowing header names to
mutate the object prototype.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts`:
- Around line 7-85: Make buildProfile in
kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts#L7-L85 the sole
profiling implementation, moving it to a shared kit script if supported;
otherwise keep both copies synchronized and document their pairing. Remove the
duplicate buildProfile from
kits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts#L47-L86 and reuse the
reference. Make validateTask in
kits/eda-analyst/scripts/eda-analyst_code-node-459_code.ts#L10-L20 the single
reason-returning validation rule set, and replace the boolean reimplementation
in kits/eda-analyst/scripts/eda-analyst_code-node-443_code.ts#L12-L19 with it.
🪄 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 Plus
Run ID: e1bae604-2906-4040-96c4-7ff3943f49b4
⛔ Files ignored due to path filters (1)
kits/eda-analyst/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (35)
kits/eda-analyst/.gitignorekits/eda-analyst/README.mdkits/eda-analyst/agent.mdkits/eda-analyst/apps/.env.examplekits/eda-analyst/apps/.gitignorekits/eda-analyst/apps/actions/orchestrate.tskits/eda-analyst/apps/app/globals.csskits/eda-analyst/apps/app/layout.tsxkits/eda-analyst/apps/app/page.tsxkits/eda-analyst/apps/next.config.mjskits/eda-analyst/apps/package.jsonkits/eda-analyst/apps/tsconfig.jsonkits/eda-analyst/constitutions/default.mdkits/eda-analyst/flows/eda-analyst.tskits/eda-analyst/lamatic.config.tskits/eda-analyst/model-configs/eda-analyst_instructor-llmnode-400_generative-model-name.tskits/eda-analyst/model-configs/eda-analyst_instructor-llmnode-740_generative-model-name.tskits/eda-analyst/model-configs/eda-analyst_instructor-llmnode-832_generative-model-name.tskits/eda-analyst/prompts/eda-analyst_instructor-llmnode-400_system_0.mdkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-400_user_1.mdkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_system_0.mdkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_user_1.mdkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-832_system_0.mdkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-832_user_1.mdkits/eda-analyst/scripts/eda-analyst_code-node-159_code.tskits/eda-analyst/scripts/eda-analyst_code-node-396_code.tskits/eda-analyst/scripts/eda-analyst_code-node-443_code.tskits/eda-analyst/scripts/eda-analyst_code-node-458_code.tskits/eda-analyst/scripts/eda-analyst_code-node-459_code.tskits/eda-analyst/scripts/eda-analyst_code-node-579_code.tskits/eda-analyst/scripts/eda-analyst_code-node-629_code.tskits/eda-analyst/scripts/eda-analyst_code-node-706_code.tskits/eda-analyst/scripts/eda-analyst_code-node-773_code.tskits/eda-analyst/scripts/eda-analyst_code-node-781_code.tskits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/eda-analyst/apps/app/page.tsx`:
- Around line 60-74: Update the URL input and buttons in the page component so
they cannot change the URL while loading is true: disable the input and each
sample button using the existing loading state, while preserving the current run
behavior and submitted URL display.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-443_code.ts`:
- Line 25: Update the deduplication key inside the add function to include
t.action alongside the existing task fields, ensuring tasks with different
actions such as impute and drop-column produce distinct keys while preserving
current validation and deduplication behavior.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts`:
- Line 34: Update the loop handling `drops` so membership is determined with an
own-property check, such as `Object.prototype.hasOwnProperty.call(drops, k)`,
instead of truthiness from `drops[k]`. Preserve dropping keys whose stored value
is an empty string and retain the existing protected-key exclusions.
🪄 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 Plus
Run ID: 33138689-ac62-4ff4-94c2-d4063899b3d8
📒 Files selected for processing (18)
kits/eda-analyst/.env.examplekits/eda-analyst/.gitignorekits/eda-analyst/agent.mdkits/eda-analyst/apps/.gitignorekits/eda-analyst/apps/actions/orchestrate.tskits/eda-analyst/apps/app/globals.csskits/eda-analyst/apps/app/page.tsxkits/eda-analyst/flows/eda-analyst.tskits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_user_1.mdkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-832_user_1.mdkits/eda-analyst/scripts/eda-analyst_code-node-159_code.tskits/eda-analyst/scripts/eda-analyst_code-node-396_code.tskits/eda-analyst/scripts/eda-analyst_code-node-443_code.tskits/eda-analyst/scripts/eda-analyst_code-node-458_code.tskits/eda-analyst/scripts/eda-analyst_code-node-459_code.tskits/eda-analyst/scripts/eda-analyst_code-node-629_code.tskits/eda-analyst/scripts/eda-analyst_code-node-781_code.tskits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts
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/eda-analyst/scripts/eda-analyst_code-node-443_code.ts`:
- Line 25: The deduplication key built in add must avoid collisions when task
fields contain the "|" separator. Replace the concatenated key construction in
add with an encoded tuple of the same task fields, such as JSON serialization,
while preserving validation and duplicate filtering behavior.
🪄 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 Plus
Run ID: e977d9af-36af-4c04-b83c-7343cdd393bf
📒 Files selected for processing (3)
kits/eda-analyst/apps/app/page.tsxkits/eda-analyst/scripts/eda-analyst_code-node-443_code.tskits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
|
|
@081rishu there are still some comments left by coderabbit. Can you check? |
|
/validate |
|
📡 Running Studio validation — results will appear here shortly. |
Studio Runtime Validation (Phase 2)✅ Studio validation passed. The kit loaded successfully in Lamatic Studio. This PR is ready for final review and merge. |
…-hook-form, zod, lucide-react)
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/eda-analyst/apps/components/ui/input.tsx`:
- Around line 5-19: Update the Input component to use React.forwardRef,
accepting the input element ref alongside its existing props and attaching it to
the rendered <input>. Preserve the current className, type, prop spreading, and
component behavior so form.register("url") can retain React Hook Form’s ref
path.
In `@kits/eda-analyst/apps/package.json`:
- Around line 12-23: Add the required lamatic dependency to the package
manifest, then update the workflow orchestration in orchestrate.ts to use the
lamatic SDK instead of the custom GraphQL fetch. Preserve the existing workflow
inputs and behavior while routing the call through the SDK’s supported
integration.
🪄 Autofix
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 Plus
Run ID: 4585fe9e-2889-40b3-b804-fe13d26b8199
⛔ Files ignored due to path filters (1)
kits/eda-analyst/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (13)
kits/eda-analyst/apps/app/globals.csskits/eda-analyst/apps/app/layout.tsxkits/eda-analyst/apps/app/page.tsxkits/eda-analyst/apps/components.jsonkits/eda-analyst/apps/components/ui/badge.tsxkits/eda-analyst/apps/components/ui/button.tsxkits/eda-analyst/apps/components/ui/card.tsxkits/eda-analyst/apps/components/ui/input.tsxkits/eda-analyst/apps/components/ui/label.tsxkits/eda-analyst/apps/lib/utils.tskits/eda-analyst/apps/package.jsonkits/eda-analyst/apps/postcss.config.mjskits/eda-analyst/apps/tsconfig.json
- isLikelyId flags all-distinct columns only when id-named, text, or integer-valued, so continuous numeric columns stay analytic (941 + 781) - add trailing newline to two system prompts (MD047) - remove deprecated baseUrl; @/* resolves via moduleResolution bundler
- add lamatic dependency; new lib/lamatic-client.ts (lazy, build-safe client)
- orchestrate.ts uses client.executeFlow(flowId, { fileUrl })
- preserves inputs, output mapping, validation, timeout and error handling
|
@CodeRabbit review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts (1)
48-51: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winKeep all-distinct integer measures eligible for analysis.
Both profilers still use
allIntegeras an ID signal. This removes valid integer-valued measures when the downstream prompts drop or excludeisLikelyIdcolumns.
kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts#L48-L51: require an ID-like name or another independent ID signal.kits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts#L65-L66: apply the identical heuristic change and keep both Code node copies synchronized.🤖 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/eda-analyst/scripts/eda-analyst_code-node-941_code.ts` around lines 48 - 51, The all-distinct integer heuristic incorrectly classifies valid integer measures as IDs. In kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts:48-51 and kits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts:65-66, update the isLikelyId logic so allInteger alone is not sufficient; require an ID-like column name or another independent ID signal, and keep both Code node copies identical.
🤖 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/eda-analyst/apps/components/ui/button.tsx`:
- Around line 37-56: Preserve React 18 ref forwarding across the public UI
primitives: in kits/eda-analyst/apps/components/ui/button.tsx lines 37-56, wrap
Button with React.forwardRef and pass the ref to Comp; in
kits/eda-analyst/apps/components/ui/card.tsx lines 5-62, wrap each Card
primitive with React.forwardRef<HTMLDivElement> and pass the ref to its rendered
div; in kits/eda-analyst/apps/components/ui/label.tsx lines 8-22, wrap Label
with React.forwardRef and pass the ref to LabelPrimitive.Root.
In `@kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_system_0.md`:
- Line 14: Update the task-mix instruction in the EDA analyst prompt to make
requirements schema-dependent: require a “compare” task only when a categorical
or boolean column is available, and require a “relationship” task only when at
least two eligible numeric columns exist. Continue requiring a “distribution”
task when applicable, and allow fewer than 4–6 tasks when the schema cannot
support the full mix; never invent column names or emit invalid tasks.
---
Duplicate comments:
In `@kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts`:
- Around line 48-51: The all-distinct integer heuristic incorrectly classifies
valid integer measures as IDs. In
kits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts:48-51 and
kits/eda-analyst/scripts/eda-analyst_code-node-781_code.ts:65-66, update the
isLikelyId logic so allInteger alone is not sufficient; require an ID-like
column name or another independent ID signal, and keep both Code node copies
identical.
🪄 Autofix
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 Plus
Run ID: 6de19587-a55f-4056-966b-11c291e76d68
⛔ Files ignored due to path filters (1)
kits/eda-analyst/apps/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (18)
kits/eda-analyst/apps/actions/orchestrate.tskits/eda-analyst/apps/app/globals.csskits/eda-analyst/apps/app/layout.tsxkits/eda-analyst/apps/app/page.tsxkits/eda-analyst/apps/components.jsonkits/eda-analyst/apps/components/ui/badge.tsxkits/eda-analyst/apps/components/ui/button.tsxkits/eda-analyst/apps/components/ui/card.tsxkits/eda-analyst/apps/components/ui/input.tsxkits/eda-analyst/apps/components/ui/label.tsxkits/eda-analyst/apps/lib/lamatic-client.tskits/eda-analyst/apps/lib/utils.tskits/eda-analyst/apps/package.jsonkits/eda-analyst/apps/postcss.config.mjskits/eda-analyst/prompts/eda-analyst_instructor-llmnode-400_system_0.mdkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_system_0.mdkits/eda-analyst/scripts/eda-analyst_code-node-781_code.tskits/eda-analyst/scripts/eda-analyst_code-node-941_code.ts
- prompt requires compare/relationship only when the schema supports them - validator gates the missing-method re-plan on _planCapabilities so it never demands an impossible task; Titanic behavior unchanged (all caps true)
|
Hi @081rishu! 👋 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! 🙏 |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_system_0.md`:
- Around line 14-16: Align validateInsightPlan with the prompt’s capability
rules: require a low-cardinality groupBy column for compare tasks, require at
least two eligible numeric columns for relationship tasks, and allow
distribution for any analyzable column. Remove the unconditional replan
requirement for fewer than three tasks so sparse schemas terminate with their
valid smaller plan, while still rejecting invalid or invented tasks.
In `@kits/eda-analyst/scripts/eda-analyst_code-node-459_code.ts`:
- Around line 13-17: The _planCapabilities function must require an eligible
measure for compare: track numeric/boolean measure columns separately from
categorical group-by columns, and set compare true only when both a
low-cardinality category and an eligible measure exist, matching validateTask’s
measure criteria. Add a regression case covering a profile with no eligible
measure column.
🪄 Autofix
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 Plus
Run ID: 5f4fd37b-985d-4dee-aa20-121f60d6ab21
📒 Files selected for processing (5)
kits/eda-analyst/apps/components/ui/button.tsxkits/eda-analyst/apps/components/ui/card.tsxkits/eda-analyst/apps/components/ui/label.tsxkits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_system_0.mdkits/eda-analyst/scripts/eda-analyst_code-node-459_code.ts
- validateInsightPlan uses a capability-aware task target (min(3, analyzable + compare + relationship)) so sparse profiles terminate with a valid smaller plan - _cat requires a low-cardinality (<=20) groupBy in 459 and its 443 mirror, matching the validator message and the prompt - prompt compare eligibility reworded to low-cardinality; Titanic unchanged
_planCapabilities now sets compare only when BOTH a low-cardinality groupBy and a numeric/boolean measure exist, matching validateTask, so a categorical-only profile no longer advertises compare support and cannot trigger an impossible re-plan. Verified via simulation incl. the no-measure case; Titanic unchanged.
|
@CodeRabbit review |
✅ Action performedReview finished.
|
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/eda-analyst/scripts/eda-analyst_code-node-459_code.ts`:
- Around line 42-48: Update the replanning logic around target and replanNeeded
to count unique valid tasks rather than valid.length. Reuse the merge node’s
canonical task fields and deduplication semantics before comparing against
target, so duplicate planner output cannot satisfy the target prematurely; add a
regression case covering repeated identical tasks.
🪄 Autofix
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 Plus
Run ID: 2d8b72c8-8a96-4100-ae78-dd3ab157f520
📒 Files selected for processing (3)
kits/eda-analyst/prompts/eda-analyst_instructor-llmnode-740_system_0.mdkits/eda-analyst/scripts/eda-analyst_code-node-443_code.tskits/eda-analyst/scripts/eda-analyst_code-node-459_code.ts
Duplicate valid tasks no longer satisfy the target: count uniques with the exact canonical key the merge node (443) dedupes on, so three copies of one task can't stop replanning and produce a single-analysis plan. Verified via simulation.
|
@CodeRabbit review |
|
EDA Analyst — autonomous exploratory-data-analysis agent
Point it at a CSV and it returns a self-contained interactive dashboard — after profiling, cleaning, and analyzing the data, checking its own work at every step.
Principle: code computes every number; the LLM only makes decisions (what to clean, how to impute, which analyses to run). The model never sees raw rows and never emits a statistic, so the output can't be silently hallucinated.
Pipeline
Extract → Profile →Sanitize(chunked LLM clean-planning → apply → validation gate that reverts on any regression) →Analyze(plan → validate → conditional re-plan → execute → findings gate) →Visualize(self-contained HTML + Chart.js).Two guarantees: cleaning is fail-safe (reverts to the original data if it would degrade it), and cost is adaptive (extra LLM calls only fire on wide data / incomplete plans).
Contents
flows/eda-analyst.ts— the flow, exported from Lamatic Studio (prompts / model-configs / scripts / constitution all@referenced).apps/— a Next.js app: enter a CSV URL → view the dashboard in-page → download it as.html.Verified
npm run build).chartCount: 5,validated: true).@referencepaths resolve; PR touches onlykits/eda-analyst/.Test input:
{ "fileUrl": "https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv" }eda-analystkit configuration, documentation, constitution, environment templates, and ignore rules.triggerNode,extractFromFileNode,codeNode,instructorLLMNode, andresponseNodenodes.gpt-5.1model configurations and six prompts for cleaning, analysis planning, and plan refinement.