010: UX Paradigm and Interaction Flows¶
- Type: Design
- Status: Accepted
- Date: 2026-12-02
- Author(s) / Deciders: João V. Farias
- Question: What CLI and shell interaction model governs workflows, feedback, and error handling in
winesmith?
Context¶
Build tools frustrate users when quick one-off runs require writing boilerplate config files or when large multi-target builds devolve into brittle shell wrappers. winesmith supports both quick ad-hoc Windows commands from any directory and declarative multi-target project pipelines driven by winesmith.toml.
Paradigm comparison¶
The table below compares strict manifest-only CLIs, stateful environment managers, and progressive disclosure across four UX criteria:
| Criterion | Strict manifest CLI | Environment manager (activate) |
Hybrid progressive disclosure (chosen) |
|---|---|---|---|
| Mental model | Requires writing config before running any command. | Requires activating and deactivating named environments globally. | exec works with zero config; larger projects adopt winesmith.toml and named targets. |
| Learning curve | Upfront setup cost before quick tests. | Requires learning lifecycle state commands immediately. | Starts with exec; flags like --target, --all-targets, and --locked appear when needed. |
| Daily speed | Fast inside configured repos, slow for one-off commands. | Extra switch steps between terminal sessions. | Direct commands for both ad-hoc execution and declared tasks, accelerated by Nushell completions. |
| Safety | High once configured. | Ambient state risks building in the wrong active environment. | Per-invocation target resolution, advisory prefix locks, --locked, and forbid_running guards. |
Requirements and restrictions¶
Three interface rules govern command progression, output streams, and defensive failure checks:
- Users progress across three workflow levels through progressive disclosure: one-off commands (
winesmith exec --win win7 --toolchain python@3.8.10 -- python --version), single-target projects (init,setup,run,shell), and multi-target CI runs (--all-targets,--locked). - Terminal output pairs cleanly with Nushell via long-only
extern --strictcommands,@structured [--json] { from json }tables,def --wrappedpassthrough forrunandexec, and local__completequeries. - Whenever
--jsonis passed,stdoutemits only valid JSON while download progress bars and diagnostics route tostderr;--verbose,--quiet,NO_COLOR, andWINEDEBUGcontrol log detail across subcommands. - Proactive guards block conflicting operations before mutation (
forbid_runningregex scans on/proc, lockfile mismatches under--locked), propagate exact child exit codes onexecandrun, and report issues cleanly viawinesmith doctor.
Detailed interaction flows for each area appear across Feature Records:
- 001: Runner and Prefix Management
- 002: Toolchain Recipes and Lockfile
- 003: Hybrid Task Runner and Execution
- 004: Nushell Integration
Alternatives¶
Requiring a winesmith.toml for every invocation would shrink CLI parsing code, yet forces developers to create temporary manifests for simple one-off checks. Providing stateful shell activation commands (use or activate) creates ambient shell variables that break across concurrent terminal tabs and CI jobs.
Decision¶
Adopt hybrid progressive disclosure on the command line backed by stateless per-command target resolution, strict stdout/stderr separation under --json, proactive guard checks (forbid_running, --locked, file locks), and native Nushell completions.
Consequences¶
Positives¶
Developers can execute a single Windows binary in one command without authoring configuration files first. Nushell users receive parse-time flag checks, live task completion, and directly pipeable records and tables.
Negatives¶
Keeping manifest options, ad-hoc CLI flags, and generated Nushell signatures aligned requires dedicated automated tests whenever flags change.