Work Packages: CLI Autocompletion

Inputs: Design documents from /kitty-specs/cli-autocompletion-01KW6N5G/ Prerequisites: plan.md, spec.md

Tests: Required for root completion command availability and representative command/subcommand completion discovery.

Organization: One focused work package owns the root CLI completion surface.

Subtask Format: [Txxx] [P?] Description

  • [P] indicates the subtask can proceed in parallel.
  • Include precise file paths or modules.

Path Conventions

  • Single project: src/, tests/

Work Package WP01: Enable CLI Autocompletion (Priority: P1)

Goal: Expose shell completion support for the root Spec Kitty CLI and verify representative top-level and nested command discovery. Independent Test: Completion support can be validated by checking completion installation/show commands and verifying generated completion data includes root commands and nested command groups. Prompt: /tasks/WP01-cli-autocompletion.md Requirement Refs: FR-001, FR-002, FR-003, FR-004, FR-005, NFR-001, NFR-002, NFR-003, NFR-004, C-001, C-002, C-003

Included Subtasks

  • □ T001 Enable root CLI completion support in src/specify_cli/__init__.py
  • □ T002 Add focused completion regression tests in tests/specify_cli/cli/commands/test_root_completion.py
  • □ T003 Verify completion output includes representative top-level commands and nested command groups
  • □ T004 Run targeted tests for the completion behavior

Implementation Notes

  • Keep command names unchanged.
  • Completion generation must not mutate project files.
  • Prefer behavior assertions over full Rich help snapshots.

Parallel Opportunities

  • Test authoring can begin once the desired root completion behavior is clear.

Dependencies

  • None.

Risks & Mitigations

  • Root help output may gain completion-related options; assert intentional behavior and avoid broad snapshot churn.

Dependency & Execution Summary

  • Sequence: WP01 only.
  • Parallelization: Not needed for this small PR.
  • MVP Scope: WP01 completes the mission.

Requirements Coverage Summary

Requirement IDCovered By Work Package(s)
FR-001WP01
FR-002WP01
FR-003WP01
FR-004WP01
FR-005WP01
NFR-001WP01
NFR-002WP01
NFR-003WP01
NFR-004WP01
C-001WP01
C-002WP01
C-003WP01

Subtask Index (Reference)

Subtask IDSummaryWork PackagePriorityParallel?
T001Enable root CLI completion supportWP01P1No
T002Add completion regression testsWP01P1Yes
T003Verify top-level and nested completion dataWP01P1No
T004Run targeted testsWP01P1No