← Back to issue list

Use a command class's `__doc__` if `overview` does not exist

View original Github issue

Metadata

Project
craft-cli
Number
#253
Type
issue
State
open
Author
lengau
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request (opened by maintainer lengau, 1 comment): make BaseCommand's `overview` optional, falling back to the command class's `__doc__`; the first line of `__doc__` could also become `help_msg`.

Suggested action: keep open

Reason: The code confirms the feature is unimplemented: `BaseCommand.__init__` still validates `mandatory = ("name", "help_msg", "overview")` and raises ValueError when any is None, and `HelpBuilder._build_plain_command_help` dereferences `command.overview` directly, with `tests/factory.py` still always setting `overview` — so there is no docstring fallback anywhere. The issue is a maintainer-authored, well-understood design change (make `overview` optional, derive it from `__doc__`) with a follow-up refinement comment from lengau about deriving `help_msg` from the first line of `__doc__`, so it should stay open rather than be closed. Confidence is capped because the exact fallback semantics (docstring dedenting, `help_msg` derivation precedence, whether an empty docstring should still error) are not specified, and the later comment broadens scope beyond the original single-sentence spec.

Evaluated by: mr-cal-bot

Impact: 32 Quick Win: 15 Complexity: 25 Confidence: 72 Actionability: 62

Issue body

### What needs to get done The `overview` attribute is often duplicative of a command class's docstring. If the `overview` attribute doesn't exist, use the command's docstring instead. ### Why it needs to get done Helps make automatic documentation better, since it'll display the command docs.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 32
Quick Win: 15
Complexity: 25
Confidence: 72
Actionability: 62
keep open Feature request (opened by maintainer lengau, 1 comment): make BaseCommand's `overview` optional, falling back to the command class's `__doc__`; the first line of `__doc__` could also become `help_msg`.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 17
Complexity: 30
Confidence: 70
Actionability: 80
needs triage Feature request to make `overview` attribute optional in BaseCommand, falling back to the command class's `__doc__` string
qwen/qwen3.8-27b
Impact: 35
Quick Win: 24
Staleness: 75
Complexity: 30
Confidence: 80
Support Request: 0
keep open Feature request to use a command class's __doc__ as a fallback for the overview attribute when it is not defined, improving automatic documentation. Still unimplemented; overview remains mandatory in BaseCommand.__init__ and no docstring fallback exists in the codebase.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 20
Confidence: 80
Support Request: 10
close stale Feature request to fallback to command class docstrings for overview and help_msg to improve auto-generated documentation. Currently unlabelled and inactive for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 75
Support Request: 5
needs triage Feature request to fallback to a command class docstring for the overview attribute when missing, improving auto-generated documentation. Currently unlabelled and inactive for over two years.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.