Skip to content

fix: Intuitive Flag Names - #36

Merged
sahil-noon merged 4 commits into
mainfrom
260717-59u8-intuitive-flag-names
Jul 17, 2026
Merged

sahil-noon merged 4 commits into
mainfrom
260717-59u8-intuitive-flag-names

Conversation

@sahil-noon

Copy link
Copy Markdown
Collaborator

Meta

Change ID Type Confidence Plan Review
59u8 fix 4.8/5.0 15/15 tasks, 28/28 acceptance ✓ ✓ 1 cycle
Impact +/− Net
raw +1340 / −138 +1202
true +495 / −38 +457
└ impl +97 / −28 +69
└ tests +398 / −10 +388

excludes fab/, docs/ · generated by fab-kit v2.15.5

Pipeline: intake ✓ → apply ✓ → review ✓ → hydrate ✓ → ship → review-pr

Summary

Flag names like --worktree-name and --delete-branch redundantly repeat their command's own noun/verb, and --worktree-init/--delete-remote are string-typed booleans forcing users to type true|false instead 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; alias wt new
  • wt delete: --delete-all → --all/-a, --delete-branch → --branch, --delete-remote true|false → --no-remote; alias wt rm
  • wt open, wt list, wt update, wt init: short flags and --no-* negation added where applicable
  • String→bool conversion mechanics applied consistently across ripple surfaces
  • Tests updated across all affected commands per Constitution IV

@sahil-noon
sahil-noon requested a review from Copilot July 17, 2026 19:52
@sahil-noon
sahil-noon marked this pull request as ready for review July 17, 2026 19:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/cmd/wt/update_test.go Outdated
Comment on lines +50 to +54
// 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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@sahil-noon
sahil-noon merged commit 97b9f0e into main Jul 17, 2026
2 checks passed
@sahil-noon
sahil-noon deleted the 260717-59u8-intuitive-flag-names branch July 17, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants