Skip to content

feat(dataset push): interactive guided mode #28

Description

@aptracebloc

Goal

Let a user run tracebloc dataset push and be prompted for what's missing instead of needing every flag up front — the streamlined guided flow. Flags still win; non-TTY/CI behavior is unchanged.

Scope

  • When required inputs are missing AND stdout is a TTY AND--no-input is not set: launch a guided flow using AlecAivazis/survey/v2:
    • pathcategory (select from the supported list) → table (validated via push.ValidateTableName) → intent (train/test select) → label-columncategory-specific fields:
      • image: target-size (default = auto-detected from the first image),
      • tabular/time-series: --schema preview from inferred types, label policy,
      • keypoint: number-of-keypoints,
      • text/MLM: confirm the texts//sequences/ (+ tokenizer.json) layout.
    • A confirm screen showing the assembled spec (reuse Phase 1–2 rendering) before running.
  • Prompts populate the existing SpecArgs — the downstream synth → validate → stage → submit path is unchanged.
  • Graceful degradation: non-TTY or --no-input → today's flag-only behavior + the same clear errors.
  • Suggested split: PR-a = prompt engine + path/category/table/intent/label; PR-b = category-specific dynamic prompts + confirm screen (mirrors the chore(data ingest): re-land #147 preflight parity onto ux (stacked-base miss) #151 PR-a/PR-b pattern).

Acceptance criteria

  • Missing-flag + TTY → guided prompts; all flags present → no prompts (unchanged).
  • --no-input / non-TTY → no prompts; missing required → same exit-2/3 errors as today.
  • Prompted values flow through the existingSpecArgs.Build + schema validation, unchanged.
  • Confirm screen; declining aborts cleanly (no cluster mutation).
  • Prompt-mapping logic unit-tested (scripted / in-memory survey transport); non-TTY path asserted.
  • make ci green.

Go concepts we'll cover

  • Interactive prompts (new dependency — survey/v2): select vs input vs confirm, reading/validating stdin.
  • Layering an optional interactive front-end over an existing flag-driven flow without duplicating logic.
  • Testing interactive code (injecting a non-terminal transport / forcing --no-input).

Notes

  • Decision locked: survey/v2 (not huh/bubbletea). Depends on #PHASE1 and #PHASE2 for the confirm/summary look. Branch off develop.

Part of the UX/interactive epic.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions