Reverts an earlier incorrect cleanup: click.option with
is_flag=False + flag_value="." is valid click syntax that
allows --cwd to work both with and without an argument:
--cwd → cwd="." (current directory)
--cwd /path → cwd="/path"
--cwd=. → cwd="."
--cwd --flag → cwd=".", flag=True (correctly parsed)
Without these parameters, --cwd requires a value and
--dangerously-skip-permissions would be misread as the cwd.
- get_myclaude_project_root() now expands ~ in MYCLAUDE_PROJECT_ROOT
(was resolving to ./~/path instead of $HOME/path)
- Extract hardcoded 16/8 depth limits as _MAX_WALK_DEPTH / _MAX_SOURCE_DEPTH
- Remove redundant cwd= from _run_pip_editable (already specified via -e)
- Add test_cwd_invalid_directory and test_env_var_expands_tilde
- Remove incorrect test_extra_args_forwarded (click.Group does not
support forwarding arbitrary args; ctx.args is always empty)
- Remove is_flag=False + flag_value="." combination which has no effect
on click option with is_flag=False (default)
- Create dedicated click.Command for upgrade instead of raw alias
assignment, so help shows correct command name