-
Couldn't load subscription status.
- Fork 0
Closed
Labels
Description
Rename App Commands to Command Handlers
Type: Task
Priority: High
Parent Epic: #10 - UI Layer Destroy Command
Estimated Effort: 2-3 hours
📋 Issue Overview
Refactor terminology to distinguish between UI commands (Clap) and Application Layer commands (DDD). This provides clear separation as we introduce UI-level commands.
🎯 Problem Statement
As we introduce UI-level commands (Clap subcommands), we need clear terminology to avoid confusion:
- UI Command: Clap subcommand (e.g.,
destroy,provision) - Command Handler: DDD Application Layer command (e.g.,
DestroyCommand,ProvisionCommand)
Currently, both concepts are called "commands" which creates ambiguity.
🎯 Goals
Establish clear naming conventions that distinguish between:
- UI Layer: Clap subcommands that handle user input
- Application Layer: DDD command handlers that orchestrate business logic
📦 Scope
Files to Update
- Rename structs/modules in
src/application/commands/for clarity - Update documentation to use "command handler" terminology
- Ensure consistent naming across the codebase
Expected Renaming Pattern
// BEFORE (Current)
pub struct DestroyCommand { /* ... */ }
pub struct ProvisionCommand { /* ... */ }
// AFTER (Proposed) - Choose one approach:
// Option A: Add Handler suffix
pub struct DestroyCommandHandler { /* ... */ }
pub struct ProvisionCommandHandler { /* ... */ }
// Option B: Use Handler prefix
pub struct DestroyHandler { /* ... */ }
pub struct ProvisionHandler { /* ... */ }Documentation Updates
Update all references in:
- Code comments
- Module documentation
- Architecture documentation
- Contributing guidelines
✅ Acceptance Criteria
- Command handlers renamed consistently across the codebase
- Documentation updated with new "command handler" terminology
- No breaking changes to functionality
- All tests pass after refactoring
- Code follows project conventions
- Clear distinction between UI commands (Clap) and command handlers (DDD)
- Module exports updated to reflect new naming
- Import statements updated throughout the codebase
Testing Requirements
- All existing unit tests pass
- All existing integration tests pass
- All E2E tests pass
- No functionality changes, only naming
🔍 Implementation Strategy
- Choose naming convention (Handler suffix vs Handler prefix)
- Update struct definitions in
src/application/commands/ - Update module exports in
mod.rsfiles - Update imports throughout the codebase
- Update documentation and code comments
- Run full test suite to verify no breakage
🔗 Related Issues
- Parent Epic: EPIC: UI Layer Destroy Command #10 (UI Layer Destroy Command)
- Precedes: Issue 10.3 (Add Clap Subcommand Configuration) - benefits from clear terminology
📚 Related Documentation
Full specification: See docs/issues/rename-app-commands-to-command-handlers.md
Copilot