refactor: Separate CLI presentation from core business logic

Complete architectural separation of concerns implementing clean layered design:

• Services Layer: Pure business logic isolated from presentation
  - WorkspaceService: TDD workspace operations
  - IssueService: Issue management and creation
  - ProjectService: Project management and milestones
  - ExportService: Unix-friendly data export

• CLI Layer: Clean presentation with command/presenter separation
  - Commands delegate to services for all business operations
  - Presenters handle formatted output and error messaging
  - Framework provides unified interface

• Benefits:
  - Eliminates mixed concerns in 943-line CLI monolith
  - Enables easier testing and maintenance
  - Preserves all existing functionality and Unix pipeline compatibility
  - Provides foundation for future CLI development

Resolves issue #20: CLI separation from core logic

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-26 15:08:54 +02:00
parent fd8f792f08
commit 7f5309c4b0
17 changed files with 1274 additions and 713 deletions

28
services/__init__.py Normal file
View File

@@ -0,0 +1,28 @@
"""
Business logic services layer.
This package contains pure business logic services that are independent of
CLI presentation concerns. Services focus on:
- Core business operations
- Data transformation
- Validation and error handling
- Integration with lower-level modules
Services should NOT:
- Handle CLI arguments directly
- Print output or format data for display
- Call sys.exit() or handle CLI-specific errors
"""
from .workspace_service import WorkspaceService
from .issue_service import IssueService
from .project_service import ProjectService
from .export_service import ExportService
__all__ = [
'WorkspaceService',
'IssueService',
'ProjectService',
'ExportService'
]