31 lines
1.8 KiB
Markdown
31 lines
1.8 KiB
Markdown
# CLI Command Router Infrastructure
|
|
|
|
## Module
|
|
Cli
|
|
|
|
## Status
|
|
IMPLEMENTED
|
|
|
|
## 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 `old` path, `new` path, `type` (deprecated), `removeIn` version, and `reason`
|
|
- 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 `--help` on 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
|