From c2cc2fd463d7bc38d0939fbbfbd8c27fd981f579 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 4 Jul 2025 05:37:33 +0000 Subject: [PATCH 1/2] Initial plan From 506a0f89198d70f9e123a8c8974cb8049f2baee8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 4 Jul 2025 05:47:28 +0000 Subject: [PATCH 2/2] Add capabilities command to answer "What can you do?" Co-authored-by: NikiforovAll <8037439+NikiforovAll@users.noreply.github.com> --- README.md | 55 +++++---- .../Commands/CapabilitiesCommand.cs | 112 ++++++++++++++++++ .../Commands/DefaultCommand.cs | 7 +- src/TechDebtMaster.Cli/Program.cs | 12 +- 4 files changed, 157 insertions(+), 29 deletions(-) create mode 100644 src/TechDebtMaster.Cli/Commands/CapabilitiesCommand.cs diff --git a/README.md b/README.md index 66f7b20..436486c 100644 --- a/README.md +++ b/README.md @@ -73,29 +73,38 @@ set DIAL_API_KEY=your-api-key-here ## Usage -### Available Commands - -#### Index Command -Index a repository to extract file summaries and prepare for analysis: - -```bash -dotnet run --project src/TechDebtMaster.Cli -- index -``` - -**Examples:** -```bash -# Index a local repository -dotnet run --project src/TechDebtMaster.Cli -- index "C:\my-project" - -# Index a repository on Linux/macOS -dotnet run --project src/TechDebtMaster.Cli -- index "/home/user/my-project" -``` - -#### Analyze Command -Analyze a repository for technical debt (currently shows mock data): - -```bash -dotnet run --project src/TechDebtMaster.Cli -- analyze +### Available Commands + +#### Capabilities Command +Get a comprehensive overview of what TechDebtMaster can do: + +```bash +dotnet run --project src/TechDebtMaster.Cli -- capabilities +# Or use the alias: +dotnet run --project src/TechDebtMaster.Cli -- what-can-you-do +``` + +#### Index Command +Index a repository to extract file summaries and prepare for analysis: + +```bash +dotnet run --project src/TechDebtMaster.Cli -- repo index +``` + +**Examples:** +```bash +# Index a local repository +dotnet run --project src/TechDebtMaster.Cli -- repo index "C:\my-project" + +# Index a repository on Linux/macOS +dotnet run --project src/TechDebtMaster.Cli -- repo index "/home/user/my-project" +``` + +#### Analyze Command +Analyze a repository for technical debt: + +```bash +dotnet run --project src/TechDebtMaster.Cli -- debt analyze ``` ## Acknowledgments diff --git a/src/TechDebtMaster.Cli/Commands/CapabilitiesCommand.cs b/src/TechDebtMaster.Cli/Commands/CapabilitiesCommand.cs new file mode 100644 index 0000000..455c9b1 --- /dev/null +++ b/src/TechDebtMaster.Cli/Commands/CapabilitiesCommand.cs @@ -0,0 +1,112 @@ +using System.Reflection; +using Spectre.Console; +using Spectre.Console.Cli; + +namespace TechDebtMaster.Cli.Commands; + +public class CapabilitiesCommand : Command +{ + public override int Execute(CommandContext context, Settings settings) + { + // Render ASCII art title + var figlet = new FigletText("TechDebtMaster").Centered().Color(Color.Green); + AnsiConsole.Write(figlet); + + // Add a divider + AnsiConsole.Write(new Rule().RuleStyle("grey30")); + AnsiConsole.WriteLine(); + + // Display version + var version = Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "1.0.0"; + AnsiConsole.MarkupLine($"[dim]Version {version}[/]"); + AnsiConsole.WriteLine(); + + // Main question and answer + AnsiConsole.MarkupLine("[bold yellow]What can TechDebtMaster do?[/]"); + AnsiConsole.WriteLine(); + + AnsiConsole.MarkupLine( + "[cyan]TechDebtMaster is your AI-powered companion for managing technical debt in your codebase.[/]" + ); + AnsiConsole.WriteLine(); + + // Core capabilities + AnsiConsole.MarkupLine("[bold underline]🔍 Core Capabilities:[/]"); + AnsiConsole.WriteLine(); + + var capabilities = new List<(string Icon, string Title, string Description)> + { + ("📊", "Smart Code Analysis", "Analyze your entire codebase using AI to identify technical debt, code smells, and improvement opportunities"), + ("🎯", "Prioritized Insights", "Get severity-based rankings of issues, helping you focus on what matters most"), + ("📱", "Interactive Reports", "Generate beautiful HTML reports you can share with your team and modify directly"), + ("🔄", "Change Tracking", "Monitor how your technical debt evolves over time with intelligent file change detection"), + ("🏷️", "Categorized Issues", "Organize findings by tags like Performance, Security, Code Smells, and more"), + ("🛠️", "Developer Integration", "Works seamlessly with VS Code and other tools through MCP (Model Context Protocol)"), + ("⚙️", "Flexible Configuration", "Customize analysis patterns, AI models, and output formats to match your workflow"), + ("🎨", "Template Management", "Use built-in or custom prompt templates to tailor analysis to your specific needs") + }; + + foreach (var (icon, title, description) in capabilities) + { + AnsiConsole.MarkupLine($"[green]{icon}[/] [bold]{title}[/]"); + AnsiConsole.MarkupLine($" {description}"); + AnsiConsole.WriteLine(); + } + + // Workflow overview + AnsiConsole.MarkupLine("[bold underline]🚀 How It Works:[/]"); + AnsiConsole.WriteLine(); + + var workflow = new List<(string Step, string Command, string Description)> + { + ("1️⃣", "tdm init", "Initialize TechDebtMaster in your repository"), + ("2️⃣", "tdm repo index", "Scan and index your codebase for analysis"), + ("3️⃣", "tdm debt analyze", "Let AI analyze your code for technical debt"), + ("4️⃣", "tdm debt show", "View results in an organized tree structure"), + ("5️⃣", "tdm debt report", "Generate shareable HTML reports") + }; + + foreach (var (step, command, description) in workflow) + { + AnsiConsole.MarkupLine($"[yellow]{step}[/] [blue]{command}[/] - {description}"); + } + + AnsiConsole.WriteLine(); + + // Integration capabilities + AnsiConsole.MarkupLine("[bold underline]🔌 Integration & Automation:[/]"); + AnsiConsole.WriteLine(); + + AnsiConsole.MarkupLine("• [green]MCP Server[/] - Start with '[blue]tdm mcp[/]' to enable external tool integration"); + AnsiConsole.MarkupLine("• [green]VS Code Integration[/] - Use '[blue]tdm init --profile vscode[/]' for seamless editor integration"); + AnsiConsole.MarkupLine("• [green]CI/CD Ready[/] - Perfect for automated code quality checks in your pipeline"); + AnsiConsole.MarkupLine("• [green]Team Collaboration[/] - Share and modify HTML reports with your team"); + AnsiConsole.WriteLine(); + + // Supported technologies + AnsiConsole.MarkupLine("[bold underline]💻 What Languages & Technologies?[/]"); + AnsiConsole.WriteLine(); + + AnsiConsole.MarkupLine("TechDebtMaster works with [green]any programming language[/] because it uses:"); + AnsiConsole.MarkupLine("• [cyan]AI-powered analysis[/] that understands code patterns across languages"); + AnsiConsole.MarkupLine("• [cyan]Flexible file filtering[/] to focus on specific file types or patterns"); + AnsiConsole.MarkupLine("• [cyan]Customizable prompts[/] that can be tailored to your technology stack"); + AnsiConsole.WriteLine(); + + // Getting started + AnsiConsole.MarkupLine("[bold underline]🎯 Ready to Start?[/]"); + AnsiConsole.WriteLine(); + + AnsiConsole.MarkupLine("Try these commands to get started:"); + AnsiConsole.MarkupLine("• [blue]tdm help[/] - See detailed usage examples"); + AnsiConsole.MarkupLine("• [blue]tdm init[/] - Initialize in your current repository"); + AnsiConsole.MarkupLine("• [blue]tdm config show[/] - View current configuration"); + AnsiConsole.WriteLine(); + + AnsiConsole.MarkupLine("[dim]TechDebtMaster: Making technical debt management simple, actionable, and collaborative.[/]"); + + return 0; + } + + public class Settings : CommandSettings { } +} \ No newline at end of file diff --git a/src/TechDebtMaster.Cli/Commands/DefaultCommand.cs b/src/TechDebtMaster.Cli/Commands/DefaultCommand.cs index 399372f..284c988 100644 --- a/src/TechDebtMaster.Cli/Commands/DefaultCommand.cs +++ b/src/TechDebtMaster.Cli/Commands/DefaultCommand.cs @@ -45,9 +45,10 @@ public override int Execute(CommandContext context, Settings settings) table.AddRow(new Markup("[green]config[/]"), new Text("Configuration management")); table.AddRow(new Markup("[green]prompts[/]"), new Text("Prompt template management")); table.AddRow(new Markup("[green]dial[/]"), new Text("DIAL API operations")); - table.AddRow(new Markup("[green]mcp[/]"), new Text("Start Model Context Protocol server")); - table.AddRow(new Markup("[green]clean[/]"), new Text("Clean up .tdm folder")); - table.AddRow(new Markup("[green]help[/]"), new Text("Show detailed help with examples")); + table.AddRow(new Markup("[green]mcp[/]"), new Text("Start Model Context Protocol server")); + table.AddRow(new Markup("[green]clean[/]"), new Text("Clean up .tdm folder")); + table.AddRow(new Markup("[green]help[/]"), new Text("Show detailed help with examples")); + table.AddRow(new Markup("[green]capabilities[/]"), new Text("Show what TechDebtMaster can do")); AnsiConsole.Write(table); AnsiConsole.WriteLine(); diff --git a/src/TechDebtMaster.Cli/Program.cs b/src/TechDebtMaster.Cli/Program.cs index 000875c..f79b59a 100644 --- a/src/TechDebtMaster.Cli/Program.cs +++ b/src/TechDebtMaster.Cli/Program.cs @@ -141,9 +141,15 @@ .WithExample("mcp", "/path/to/repo") .WithExample("mcp", "--port", "3001"); - config - .AddCommand("help") - .WithDescription("Show detailed help with usage examples and workflows"); + config + .AddCommand("help") + .WithDescription("Show detailed help with usage examples and workflows"); + + config + .AddCommand("capabilities") + .WithDescription("Show what TechDebtMaster can do for you") + .WithAlias("what-can-you-do") + .WithExample("capabilities"); config.AddBranch( "config",