# AdvisoryAI Chat CLI (stella advise ask) ## Module Cli ## Status VERIFIED ## Description Interactive AI chat queries from the terminal scoped to specific container images, digests, or environments for security advisory assistance. ## Implementation Details - **Command Group**: `src/Cli/StellaOps.Cli/Commands/Advise/AdviseChatCommandGroup.cs` -- `AdviseChatCommandGroup` (internal static class) - **Chat Renderer**: `src/Cli/StellaOps.Cli/Commands/Advise/ChatRenderer.cs` -- terminal rendering for chat responses - **Chat Service**: `src/Cli/StellaOps.Cli/Services/Chat/` -- backend chat client and models - **Chat Models**: `src/Cli/StellaOps.Cli/Services/Models/Chat/` -- request/response DTOs - **Commands**: - `stella advise ask ` -- ask the advisory AI assistant a question. Options: `--image|-i ` (scope to container image), `--digest|-d ` (scope to artifact digest), `--environment|-e ` (scope to environment) - `stella advise chat-doctor` -- diagnose advisory AI connectivity and configuration - `stella advise chat-settings` -- view/update chat configuration - **Configuration**: `src/Cli/StellaOps.Cli/Configuration/StellaOpsCliOptions.cs` -- CLI options including advisory AI endpoint settings ## E2E Test Plan - [ ] Run `stella advise ask "What CVEs affect this image?"` and verify a response is returned - [ ] Run `stella advise ask "Is CVE-2024-1234 reachable?" --image myregistry/app:v1.0` and verify image-scoped response - [ ] Run `stella advise ask "Show risk summary" --digest sha256:abc123` and verify digest-scoped response - [ ] Run `stella advise ask "What's the risk?" --environment production` and verify environment-scoped response - [ ] Run `stella advise chat-doctor` and verify connectivity/configuration diagnostics - [ ] Run `stella advise chat-settings` and verify settings are displayed - [ ] Verify error handling when advisory AI service is unavailable - [ ] Verify `--verbose` flag shows additional request/response details ## 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/advisoryai-chat-cli/run-001/tier2-integration-check.json`