2.3 KiB
2.3 KiB
CLI Command Router Infrastructure
Module
Cli
Status
VERIFIED
Description
Foundation infrastructure for CLI command consolidation including a route-based command router, JSON-driven route mapping (60+ mappings), command group builder for hierarchical command trees, and deprecation warning system.
Implementation Details
- Infrastructure:
src/Cli/StellaOps.Cli/Infrastructure/-- command router, route resolver, deprecation middleware - Route Mapping:
src/Cli/StellaOps.Cli/cli-routes.json-- JSON file with 60+ route mappings defining old->new command paths, deprecation versions, and reasons - Command Factory:
src/Cli/StellaOps.Cli/Commands/CommandFactory.cs-- hierarchical command tree builder using route mappings - Sprint: SPRINT_20260118_010_CLI_consolidation_foundation
- Architecture:
- Route-based command router intercepts old command paths and redirects to new consolidated paths
- Each mapping has
oldpath,newpath,type(deprecated),removeInversion, andreason - Supports settings consolidation (Sprint 011), verification consolidation (Sprint 012), and scanning consolidation (Sprint 013)
- Tests:
src/Cli/__Tests/StellaOps.Cli.Tests/Infrastructure/CommandRouterTests.cs
E2E Test Plan
- Verify all 60+ route mappings correctly redirect old commands to new paths
- Verify deprecation warnings are emitted on stderr for deprecated command paths
- Verify new command paths work without deprecation warnings
- Verify command tree hierarchy is properly built from route mappings
- Verify
--helpon deprecated commands shows migration guidance - Verify route resolver handles unknown commands gracefully with error message
- Verify route mapping JSON is valid and parseable at startup
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-command-router-infrastructure/run-001/tier2-integration-check.json