Skip to content

feat(studio): add the describe-with-AI job config generation hook - #1021

Open
steramae-nvidia wants to merge 2 commits into
mainfrom
steramae/dd-ai-generation-hook
Open

feat(studio): add the describe-with-AI job config generation hook#1021
steramae-nvidia wants to merge 2 commits into
mainfrom
steramae/dd-ai-generation-hook

Conversation

@steramae-nvidia

Copy link
Copy Markdown
Contributor

What

useDescribeWithAi drives the generate → validate → repair loop that drafts a Data Designer job config from a plain-language description:

  • calls the model with the existing generateDataDesignerJobRequest tool
  • parses the tool call and normalizes the result
  • runs the draft through validateGeneratedJobRequest, so nothing unloadable can reach the builder
  • when validation reports problems, buildFixMessages replays the original prompt, the draft, and the specific issues back to the model so it can repair its own output

Also drops the Alias "x" now uses "y" instead of the drafted "z" warning from aiSeed. The generation model overrides drafted aliases by design, so that warning fired on essentially every run — and would have sent the new repair loop chasing a non-issue.

Why

PR 2 of 3 in the "Describe with AI" stack. This is all logic and tests, no UI imports, which is why it's separable.

⚠️ The hook is not consumed by anything until PR 3. It's fully tested but technically unused at this commit. Flagging in case you'd rather I squash it into the UI PR.

Stack

  1. steramae/dd-start-selection — contract refactor
  2. → this PR — generation hook
  3. steramae/dd-ai-start-option — the panel, and flipping the tile on

Testing

  • pnpm --filter nemo-studio-ui typecheck — clean
  • pnpm --filter nemo-studio-ui test src/components/CreateFilesetStart src/routes/DataDesignerJobBuildRoute/aiSeed.test.ts — 34 passing

🤖 Generated with Claude Code

onContinue took (optionId, templateId?), which could not carry a payload
per option without growing more optional arguments. Replace it with a
StartSelection union so each option's payload travels with its own case.

The Continue footer now renders as soon as an option is picked and
disables itself with a hint, rather than appearing only once the choice
is complete — previously the button materialized with no explanation of
what was missing.

Signed-off-by: Sean Teramae <steramae@nvidia.com>
useDescribeWithAi drives the generate/validate/repair loop for drafting a
Data Designer job config from a plain-language description: it calls the
model with the job-config tool, parses the tool call, and runs the draft
through validateGeneratedJobRequest so nothing unloadable reaches the
builder. When validation reports problems, buildFixMessages replays the
prompt, the draft, and the issues so the model can repair its own output.

The hook is not wired into any UI yet — the Describe with AI panel that
consumes it lands next.

Also drops the "alias now uses X instead of the drafted Y" warning from
aiSeed: the generation model always overrides drafted aliases by design,
so the warning fired on every run and would have made the repair loop
chase a non-issue.

Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
steramae-nvidia requested review from a team as code owners July 31, 2026 19:41
@github-actions github-actions Bot added the feat label Jul 31, 2026
Base automatically changed from steramae/dd-start-selection to main August 4, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant