# CLI API Spec Download Command ## Module Cli ## Status VERIFIED ## Description `stella api spec download` command for retrieving the aggregate OpenAPI specification with checksum/ETag verification, enabling offline API reference consumption. ## Implementation Details - **Command Handlers**: `src/Cli/StellaOps.Cli/Commands/CommandHandlers.cs` -- partial class containing API spec download handler - **Command Registration**: `src/Cli/StellaOps.Cli/Commands/CommandFactory.cs` -- registers `api spec download` in command tree - **Sprint**: SPRINT_0204_0001_0004_cli_iv - **Commands**: - `stella api spec download` -- download the aggregate OpenAPI spec. Options: `--output `, `--format json|yaml`, `--verify` (checksum/ETag verification) ## E2E Test Plan - [ ] Run `stella api spec download --output ./openapi.json` and verify OpenAPI spec file created - [ ] Run `stella api spec download --format yaml` and verify YAML format output - [ ] Run `stella api spec download --verify` and verify checksum/ETag verification passes - [ ] Run command again and verify ETag caching skips re-download when spec unchanged - [ ] Verify downloaded spec is valid OpenAPI 3.x format - [ ] Verify error handling when API server is unreachable ## Verification - **Verified**: 2026-02-13T15:30:00Z - **Tier 0 (Source)**: pass -- all referenced source files exist on disk - **Tier 1 (Build)**: pass -- module builds cleanly, 412 tests pass in StellaOps.Cli.Commands.Tests - **Tier 2d (Integration)**: pass -- targeted integration tests confirm behavioral correctness - **Test Project**: `src/Cli/__Tests/StellaOps.Cli.Commands.Tests/StellaOps.Cli.Commands.Tests.csproj` - **Evidence**: `docs/qa/feature-checks/runs/cli/cli-api-spec-download-command/run-001/tier2-integration-check.json`