Repository navigation
fix: Intuitive Flag Names - #36
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request standardizes the wt CLI flag surface to be more intuitive by removing redundant per-command prefixes, adopting --no-* negation for default-on behaviors, adding short flags and command aliases for interactive muscle memory, and preserving full backward compatibility via hidden deprecated aliases (MarkDeprecated).
Changes:
- Renamed several flags to shorter primary forms (e.g.
--worktree-name→--name,--delete-all→--all,--go→--select,--skip-brew-update→--no-brew-update) while keeping old names as hidden deprecated aliases. - Converted string-typed booleans to real boolean flags where appropriate (
--worktree-init→--no-init,--delete-remote→--no-remote) with explicit precedence logic. - Added short flags (
-n,-o,-a) and command aliases (new,rm,ls) plus updated tests and documentation/spec/memory to match.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/cmd/wt/update.go | Adds --no-brew-update as primary with deprecated --skip-brew-update alias. |
| src/cmd/wt/update_test.go | Updates/extends tests for help visibility, deprecation, and new flag acceptance. |
| src/cmd/wt/testutil_test.go | Adds helpers for asserting remote branch existence/non-existence. |
| src/cmd/wt/open.go | Adds --select primary (deprecated --go) and -a short for --app. |
| src/cmd/wt/open_test.go | Adds tests for -a/--app and help hiding/showing of --go/--select. |
| src/cmd/wt/list.go | Adds ls alias for wt list. |
| src/cmd/wt/list_test.go | Adds test verifying wt ls alias behavior. |
| src/cmd/wt/integration_test.go | Adds end-to-end coverage for wt open --select and deprecated --go. |
| src/cmd/wt/init.go | Sharpens wt init short help text to reduce confusion with git init. |
| src/cmd/wt/init_test.go | Adds test coverage for updated init short description in help output. |
| src/cmd/wt/delete.go | Adds rm alias; introduces --all/-a, --branch, --no-remote with deprecated aliases. |
| src/cmd/wt/delete_test.go | Adds coverage for new delete flags, alias, help hiding, and remote-deletion behavior. |
| src/cmd/wt/create.go | Adds new alias; introduces --name/-n, --open/-o, --no-init with deprecated aliases and reconciliation. |
| src/cmd/wt/create_test.go | Adds coverage for new create flags/shorts/alias plus deprecated alias behavior. |
| README.md | Updates command summary table to reflect new primary flags and aliases. |
| fab/changes/260717-59u8-intuitive-flag-names/plan.md | Captures detailed plan/requirements and acceptance checklist for the change. |
| fab/changes/260717-59u8-intuitive-flag-names/intake.md | Records motivation, decisions, and back-compat mechanism for the flag sweep. |
| fab/changes/260717-59u8-intuitive-flag-names/.status.yaml | Tracks fab pipeline status and metrics for the change. |
| fab/changes/260717-59u8-intuitive-flag-names/.history.jsonl | Records stage transition history for the change. |
| docs/specs/worktree-layout.md | Updates spec references from --worktree-name to --name and --delete-branch to --branch. |
| docs/specs/index.md | Updates spec index blurb to reference --name override instead of --worktree-name. |
| docs/specs/cli-surface.md | Updates CLI surface spec: new flags, aliases, deprecated alias notes, and wt update flag docs. |
| docs/memory/wt-cli/update-command-contract.md | Updates memory contract to make --no-brew-update primary while preserving --skip-brew-update alias. |
| docs/memory/wt-cli/recency-ordering-contract.md | Updates memory references from wt open --go to wt open --select (with alias note). |
| docs/memory/wt-cli/menu-navigation-contract.md | Updates memory references to the renamed composition flag and clarifies historical naming. |
| docs/memory/wt-cli/index.md | Adds the new flag-naming-conventions memory entry and updates related descriptions. |
| docs/memory/wt-cli/idle-staleness-contract.md | Updates memory references to --all/--branch/--no-remote and alias behavior. |
| docs/memory/wt-cli/go-command-contract.md | Updates memory contract to describe wt open --select composition (deprecated --go). |
| docs/memory/wt-cli/flag-naming-conventions.md | Introduces new cross-command memory documenting flag naming and back-compat conventions. |
| docs/memory/wt-cli/create-output-phases.md | Updates memory doc to reference --open (and deprecated alias) for Open phase gating. |
| docs/memory/wt-cli/create-branch-semantics.md | Updates memory contract references for --name and --reuse requires --name messaging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // TestUpdate_SkipBrewUpdateFlagHiddenFromHelp asserts the deprecated | ||
| // --skip-brew-update alias is HIDDEN from `wt update --help` (pflag auto-hides | ||
| // MarkDeprecated flags) after the rename to --no-brew-update (change 59u8). The | ||
| // primary flag's help visibility is guarded by | ||
| // TestUpdate_NoBrewUpdateFlagInHelp; the deprecated alias' continued acceptance |
There was a problem hiding this comment.
Fixed — removed the redundant TestUpdate_SkipBrewUpdateFlagHiddenFromHelp; the deprecated-alias help-hiding assertion is fully covered by TestUpdate_NoBrewUpdateFlagInHelp, and acceptance/deprecation coverage remains in TestUpdate_SkipBrewUpdateFlagAccepted / _Deprecated. (48e6ca8)
Meta
59u8excludes
fab/,docs/· generated by fab-kit v2.15.5Pipeline: intake ✓ → apply ✓ → review ✓ → hydrate ✓ → ship → review-pr
Summary
Flag names like
--worktree-nameand--delete-branchredundantly repeat their command's own noun/verb, and--worktree-init/--delete-remoteare string-typed booleans forcing users to typetrue|falseinstead of using a real flag. This change renames flags to drop redundant prefixes, converts string-bools to real bools, standardizes negation as--no-*, adds short flags for common interactive use, and adds command aliases (new,rm) for git/unix muscle memory — every rename keeps the old flag as a hidden deprecated alias, so nothing breaks.Changes
wt create:--worktree-name→--name/-n,--worktree-open→--open/-o,--worktree-init true|false→--no-init; aliaswt newwt delete:--delete-all→--all/-a,--delete-branch→--branch,--delete-remote true|false→--no-remote; aliaswt rmwt open,wt list,wt update,wt init: short flags and--no-*negation added where applicable