|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Critical Rules |
| 6 | + |
| 7 | +**These rules override all other instructions:** |
| 8 | + |
| 9 | +1. **NEVER commit directly to main** - Always create a feature branch and submit a pull request |
| 10 | +2. **Conventional commits** - Format: `type(scope): description` |
| 11 | +3. **GitHub Issues for TODOs** - Use `gh` CLI to manage issues, no local TODO files. Use conventional commit format for issue titles |
| 12 | +4. **Pull Request titles** - Use conventional commit format (same as commits) |
| 13 | +5. **Branch naming** - Use format: `type/short-description` (e.g., `feat/settings-dialog`) |
| 14 | +6. **Working an issue** - Always create a new branch from an updated main branch |
| 15 | +7. **Check branch status before pushing** - Verify the remote tracking branch still exists. If a PR was merged/deleted, create a new branch from main instead |
| 16 | +8. **WinUI 3 for all UI** - All UI must use WinUI 3/XAML with modern styling (Fluent Design, theme resources, no hardcoded colors except brand purple #68217A) |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +### GitHub CLI Commands |
| 21 | + |
| 22 | +```bash |
| 23 | +gh issue list # List open issues |
| 24 | +gh issue view <number> # View details |
| 25 | +gh issue create --title "type(scope): description" --body "..." |
| 26 | +gh issue close <number> |
| 27 | +``` |
| 28 | + |
| 29 | +### Conventional Commit Types |
| 30 | + |
| 31 | +| Type | Description | |
| 32 | +|------|-------------| |
| 33 | +| `feat` | New feature | |
| 34 | +| `fix` | Bug fix | |
| 35 | +| `docs` | Documentation only | |
| 36 | +| `refactor` | Code change that neither fixes a bug nor adds a feature | |
| 37 | +| `test` | Adding or updating tests | |
| 38 | +| `chore` | Maintenance tasks | |
| 39 | +| `ci` | CI/CD changes | |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## Project Overview |
| 44 | + |
| 45 | +VSToolbox is a WinUI 3 desktop application for managing Visual Studio installations. It provides a system tray application to quickly launch VS instances, open developer command prompts, and access installation folders. |
| 46 | + |
| 47 | +## Build Commands |
| 48 | + |
| 49 | +```bash |
| 50 | +# Build the project |
| 51 | +dotnet build src/CodingWithCalvin.VSToolbox/CodingWithCalvin.VSToolbox.csproj |
| 52 | + |
| 53 | +# Run the application |
| 54 | +dotnet run --project src/CodingWithCalvin.VSToolbox/CodingWithCalvin.VSToolbox.csproj |
| 55 | +``` |
| 56 | + |
| 57 | +## Architecture |
| 58 | + |
| 59 | +### Project Structure |
| 60 | + |
| 61 | +- **CodingWithCalvin.VSToolbox** - Main WinUI 3 application |
| 62 | +- **CodingWithCalvin.VSToolbox.Core** - Core library with models and services |
| 63 | + |
| 64 | +### Key Components |
| 65 | + |
| 66 | +- `App.xaml.cs` - Application entry point, window management, single-instance support |
| 67 | +- `MainPage.xaml` - Main UI with Installed/Settings tabs |
| 68 | +- `MainViewModel.cs` - ViewModel for VS instance discovery and launching |
| 69 | +- `TrayIconService.cs` - System tray icon management |
| 70 | +- `SettingsService.cs` - User settings persistence (JSON file in %LOCALAPPDATA%) |
| 71 | + |
| 72 | +### Features |
| 73 | + |
| 74 | +- Discovers installed Visual Studio instances via vswhere |
| 75 | +- Launch VS instances directly |
| 76 | +- Open VS Developer Command Prompt (CMD/PowerShell) |
| 77 | +- Open installation folder in Explorer |
| 78 | +- System tray integration with show/hide support |
| 79 | +- Configurable startup and minimize/close behavior |
| 80 | + |
| 81 | +## Technology Stack |
| 82 | + |
| 83 | +- .NET 10.0 (Preview) |
| 84 | +- WinUI 3 / Windows App SDK |
| 85 | +- Windows 10.0.19041.0 target |
| 86 | +- Unpackaged deployment (WindowsPackageType=None) |
| 87 | + |
| 88 | +## UI Guidelines |
| 89 | + |
| 90 | +- Purple theme color: `#68217A` |
| 91 | +- Square window corners (no rounded corners) |
| 92 | +- Custom title bar with minimize/close buttons (no maximize) |
| 93 | +- System tray integration |
| 94 | + |
| 95 | +## Scripts |
| 96 | + |
| 97 | +Helper scripts in `scripts/` folder: |
| 98 | +- `extract_icon.ps1` - Extract icon from VS devenv.exe |
| 99 | +- `extract_large_icon.ps1` - Extract large (256x256) icon from VS devenv.exe |
0 commit comments