Skip to content

2026.41

@gregmagolan gregmagolan tagged this 04 Oct 21:09
The `--task:*` flags were unheaded root globals, so every task's
`--help` listed them ahead of the task's own options — including tasks
like `mcp` and `auth login`, where naming the invocation for a status
surface means nothing.

`task()` now takes `show_task_options` (default `False`). A task that
sets it lists the flags under a `Task Options` heading after its own
options, followed by the features footer. Every other task still accepts
the flags but hides both. `-h, --help` now closes the options list, and
the root and group help no longer list the task flags. An alias inherits
the setting from its base task.

`build`, `test`, `lint`, `format`, `gazelle`, `delivery`, `run` and `ci
warming` opt in.

Also, a string flag with no default no longer ends its help text with an
empty `[default: ]`.

```
Usage: aspect mcp [OPTIONS]

Mcp Options:
      --deployment <deployment>  The configured Workflows deployment to serve build results from …

Options:
  -h, --help  Print help
```

---

### Changes are visible to end-users: yes

- Searched for relevant documentation and updated as needed: yes
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: yes

- `--help` for a task now lists the `--task:*` flags under a `Task
Options` heading, after the task's own options, and only on tasks that
report to CI status surfaces (`build`, `test`, `lint`, `format`,
`gazelle`, `delivery`, `run`, `ci warming`). The flags are still
accepted on every task.
- Custom tasks can opt in with `task(show_task_options = True)`.
- `--help` no longer prints an empty `[default: ]` after string flags
that have no default.

### Test plan

- New test cases added
- Manual testing: `aspect mcp --help`, `aspect build --help`, `aspect
--help` and `aspect auth --help`; `aspect --task:name=x build …` still
parses

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Assets 2
Loading