# Sprint 021 - TaskRunner CLI ## Topic & Scope - Surface TaskRunner capabilities via CLI - Add task execution, monitoring, and artifact management commands - Working directory: `src/Cli/` - Expected evidence: CLI commands, unit tests - Note: From FEATURE_GAPS_REPORT.md Batch 12 (Operations) ## Dependencies & Concurrency - No upstream sprint dependencies - Can run in parallel with other CLI sprints - Depends on TaskRunner service ## Documentation Prerequisites - `docs/modules/taskrunner/architecture.md` - `docs/FEATURE_GAPS_REPORT.md` (Batch 12) - TaskRunner service APIs ## Delivery Tracker ### TRN-001 - Add `stella taskrunner status` command Status: DONE Dependency: none Owners: Developer Task description: - Create TaskRunnerCommandGroup.cs with `status` subcommand - Report TaskRunner service health and capacity - Include worker pool metrics Completion criteria: - [x] `stella taskrunner status` returns service status - [x] Output includes service health (healthy/degraded/unhealthy) - [x] Output includes worker count and capacity - [x] Output includes queue depth - [x] Supports `--format json|table` ### TRN-002 - Add `stella taskrunner tasks list/show` commands Status: DONE Dependency: TRN-001 Owners: Developer Task description: - Add `tasks` subcommand group for task inspection - List tasks with filtering by status and type - Show detailed task information Completion criteria: - [x] `stella taskrunner tasks list` returns task list - [x] Supports `--status pending|running|completed|failed` filter - [x] Supports `--type ` filter - [x] Supports `--from` and `--to` time range - [x] `stella taskrunner tasks show ` returns task details - [x] Details include steps, timing, artifacts - [x] Supports `--format json|table` ### TRN-003 - Add `stella taskrunner tasks cancel` command Status: DONE Dependency: TRN-002 Owners: Developer Task description: - Add `cancel` subcommand for task cancellation - Cancel running or pending tasks - Include graceful shutdown option Completion criteria: - [x] `stella taskrunner tasks cancel ` cancels task - [x] Supports `--graceful` for graceful shutdown - [x] Supports `--force` for immediate termination - [x] Returns cancellation status - [x] Only works on running/pending tasks ### TRN-004 - Add `stella taskrunner artifacts list/get` commands Status: DONE Dependency: none Owners: Developer Task description: - Add `artifacts` subcommand group for artifact management - List artifacts captured by tasks - Download artifacts to local filesystem Completion criteria: - [x] `stella taskrunner artifacts list --task ` lists artifacts - [x] Output includes artifact name, type, size, digest - [x] `stella taskrunner artifacts get ` downloads artifact - [x] Supports `--output ` for download location - [x] Verifies artifact digest after download - [x] Supports `--format json|table` ### TRN-005 - Add `stella taskrunner logs` command Status: DONE Dependency: TRN-002 Owners: Developer Task description: - Add `logs` subcommand for task log retrieval - Stream or download task execution logs - Filter by step and log level Completion criteria: - [x] `stella taskrunner logs ` shows task logs - [x] Supports `--follow` for streaming - [x] Supports `--step ` filter - [x] Supports `--level error|warn|info|debug` filter - [x] Supports `--output ` for log download ## Execution Log | Date (UTC) | Update | Owner | | --- | --- | --- | | 2026-01-17 | Sprint created from FEATURE_GAPS_REPORT.md Batch 12 | Planning | | 2026-01-16 | TRN-001 through TRN-005: Created TaskRunnerCommandGroup.cs | Developer | ## Decisions & Risks - Task cancellation may leave resources in inconsistent state - Artifact download may be slow for large artifacts - Log streaming requires WebSocket or SSE support ## Next Checkpoints - Sprint kickoff: TBD - Mid-sprint review: TBD - Sprint completion: TBD