Mission Specification: Short Help Flag

Mission Branch: short-help-flag-01KW6N7D Created: 2026-06-28 Status: Draft Input: User description: "add an expected -h. Currently we only have --help; make sure the -h works anywhere --help works."

User Scenarios & Testing (mandatory)

User Story 1 - Request Root Help With a Short Flag (Priority: P1)

A CLI user can run spec-kitty -h and receive the same help information they would receive from spec-kitty --help.

Why this priority: The root help command is the most common first contact for users exploring the CLI and establishes the expected shorthand behavior.

Independent Test: Can be tested by comparing the help output and exit behavior of spec-kitty -h and spec-kitty --help.

Acceptance Scenarios:

1. Given a user is at any location where the CLI can be invoked, When the user runs spec-kitty -h, Then the CLI shows root help successfully. 2. Given root help is available with --help, When the user requests root help with -h, Then the result is equivalent for user-facing help content and success/failure behavior.


User Story 2 - Request Command and Subcommand Help With a Short Flag (Priority: P1)

A CLI user can append -h anywhere they currently append --help, including command groups and nested subcommands.

Why this priority: The user explicitly requires consistency across the command surface, not only at the root command.

Independent Test: Can be tested by selecting representative root, command-group, and nested subcommand help locations and verifying -h works anywhere --help works.

Acceptance Scenarios:

1. Given a command group supports --help, When a user runs that command group with -h, Then the CLI shows the command group's help successfully. 2. Given a nested subcommand supports --help, When a user runs that nested subcommand with -h, Then the CLI shows the nested subcommand's help successfully. 3. Given a help location has command-specific options or subcommands, When the user requests help with -h, Then those same user-facing details are visible as they are with --help.


Edge Cases

  • -h should be treated as a help request, not as an unknown option, at every command path where --help is accepted.
  • -h should not change the behavior of non-help short options if any exist or are added later.
  • Help output should preserve existing exit behavior and not trigger command side effects.
  • The user-facing help content for -h should not drift from --help over time.

Requirements (mandatory)

Functional Requirements

IDTitleUser StoryPriorityStatus
FR-001Root short helpAs a CLI user, I want spec-kitty -h to show root help so that the common short help flag works as expected.HighOpen
FR-002Command-group short helpAs a CLI user, I want -h to work for every command group where --help works so that help access is consistent.HighOpen
FR-003Nested subcommand short helpAs a CLI user, I want -h to work for every nested subcommand where --help works so that deep workflows are easy to inspect.HighOpen
FR-004Help parityAs a CLI user, I want -h help content and exit behavior to match --help so that either flag is interchangeable for help.HighOpen
FR-005No command side effectsAs a CLI user, I want -h to display help without running the target command's action so that asking for help is safe.HighOpen

Non-Functional Requirements

IDTitleRequirementCategoryPriorityStatus
NFR-001Command-surface coverageAutomated tests must verify -h for the root command, at least two command groups, and at least two nested subcommands.TestabilityHighOpen
NFR-002Parity thresholdFor tested command paths, -h and --help must produce equivalent user-facing help content and the same exit status in 100% of cases.ConsistencyHighOpen
NFR-003Safe help behaviorHelp requests using -h must not create, modify, or delete project files in 100% of tested help invocations.ReliabilityHighOpen
NFR-004DiscoverabilityRoot help output must make the availability of help clear without requiring users to know implementation details.UsabilityMediumOpen

Constraints

IDTitleConstraintCategoryPriorityStatus
C-001Exact scope-h must work anywhere --help works across the CLI command surface.ProductHighOpen
C-002Preserve long helpExisting --help behavior must remain available and compatible.CompatibilityHighOpen
C-003Independent PRThis mission must remain independently reviewable from autocompletion, alphabetical command listing, and version output missions.DeliveryHighOpen

Success Criteria (mandatory)

Measurable Outcomes

  • SC-001: spec-kitty -h shows root help with the same exit status as spec-kitty --help.
  • SC-002: -h works for 100% of tested command groups and nested subcommands where --help works.
  • SC-003: For every tested command path, -h and --help expose equivalent user-facing help content.
  • SC-004: Help invocations using -h complete without mutating project files in all automated tests.

Assumptions

  • "Anywhere --help works" includes root commands, command groups, and nested subcommands exposed through the CLI.
  • Exact byte-for-byte output identity is not required if the CLI framework includes invocation-specific formatting, but user-facing help content and exit behavior must be equivalent.