feat: Complete CLI consolidation - fix redundancy and missing interfaces

🎯 MAJOR CLI ARCHITECTURE CONSOLIDATION:

 Added Missing CLI Entry Points:
• tddai = "tddai_cli:main" - TDD workflow management
• issue = "cli.issue_cli:main" - Pure issue management
• All three CLIs now properly installed: markitect, tddai, issue

🧹 Eliminated Functionality Redundancy:
• Removed issue commands from markitect/cli.py (clean separation)
• MarkiTect now focuses purely on document processing
• TDD workflow in tddai CLI, issue management in issue CLI

🏗️ Clean Architecture Implementation:
• Created cli/issue_cli.py - Dedicated pure issue management
• Enhanced cli/commands/export.py with export_issues_csv/json
• Updated cli/core.py with proper export method delegation
• Fixed pyproject.toml to include all required packages

🧪 Comprehensive Testing:
• Added tests/test_cli_consolidation.py - Prevents CLI regression
• Tests ensure all CLIs are installed and functional
• Tests verify no functionality duplication
• Regression protection against missing CLI commands

📋 Clear Separation of Concerns:
• markitect CLI - Document processing, templates, performance
• tddai CLI - TDD workflow, workspace management, coverage
• issue CLI - Pure issue operations, project management, export

🔧 Package Configuration:
• Updated pyproject.toml to include cli*, tddai*, services*, etc.
• Added py-modules for tddai_cli standalone module
• Fixed import paths and dependencies

This consolidation resolves the major redundancy identified in issues
functionality and ensures proper CLI interfaces are available and tested.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-02 23:04:57 +02:00
parent bf84f206fe
commit 960a7c4850
10 changed files with 995 additions and 7 deletions

View File

@@ -96,6 +96,11 @@ def create_from_template(template_file: str, **kwargs: Any) -> None:
_get_cli().create_from_template(template_file, **kwargs)
def close_issue(issue_number: int, comment: str = "") -> None:
"""Close an issue with optional comment."""
_get_cli().close_issue(issue_number, comment)
def analyze_coverage(issue_number: int) -> None:
"""Analyze test coverage for a specific issue."""
_get_cli().analyze_coverage(issue_number)
@@ -203,6 +208,10 @@ def main() -> None:
coverage_parser = subparsers.add_parser('analyze-coverage', help='Analyze test coverage for issue')
coverage_parser.add_argument('issue_number', type=int, help='Issue number')
close_parser = subparsers.add_parser('close-issue', help='Close an issue')
close_parser.add_argument('issue_number', type=int, help='Issue number')
close_parser.add_argument('--comment', help='Optional closing comment', default='')
# Issue creation commands
create_parser = subparsers.add_parser('create-issue', help='Create a new issue')
create_parser.add_argument('title', help='Issue title')
@@ -285,6 +294,8 @@ def main() -> None:
show_issue(args.issue_number)
elif args.command == 'analyze-coverage':
analyze_coverage(args.issue_number)
elif args.command == 'close-issue':
close_issue(args.issue_number, args.comment)
elif args.command == 'create-issue':
create_issue(args.title, args.body, args.type)
elif args.command == 'create-enhancement':