|
| 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/scope/short-description` (e.g., `feat/ui/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. **Microsoft coding guidelines** - Follow [Microsoft C# coding conventions](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions) and [.NET library design guidelines](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/) |
| 17 | +9. **WPF for all UI** - All UI must be implemented using WPF (XAML/C#). No web-based technologies (HTML, JavaScript, WebView) |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +### GitHub CLI Commands |
| 22 | + |
| 23 | +```bash |
| 24 | +gh issue list # List open issues |
| 25 | +gh issue view <number> # View details |
| 26 | +gh issue create --title "type(scope): description" --body "..." |
| 27 | +gh issue close <number> |
| 28 | +``` |
| 29 | + |
| 30 | +### Conventional Commit Types |
| 31 | + |
| 32 | +| Type | Description | |
| 33 | +|------|-------------| |
| 34 | +| `feat` | New feature | |
| 35 | +| `fix` | Bug fix | |
| 36 | +| `docs` | Documentation only | |
| 37 | +| `refactor` | Code change that neither fixes a bug nor adds a feature | |
| 38 | +| `test` | Adding or updating tests | |
| 39 | +| `chore` | Maintenance tasks | |
| 40 | +| `perf` | Performance improvement | |
| 41 | +| `ci` | CI/CD changes | |
| 42 | + |
| 43 | +### VSIX Development Rules |
| 44 | + |
| 45 | +**Solution & Project Structure:** |
| 46 | +- SLNX solution files only (no legacy .sln) |
| 47 | +- Solution naming: `CodingWithCalvin.<ProjectFolder>` |
| 48 | +- Primary project naming: `CodingWithCalvin.<ProjectFolder>` |
| 49 | +- Additional project naming: `CodingWithCalvin.<ProjectFolder>.<Classifier>` |
| 50 | + |
| 51 | +**Build Configuration:** |
| 52 | +- Configurations: Debug and Release |
| 53 | +- Platform: AnyCPU (or x64 where required) |
| 54 | +- Build Tools: Latest 17.* release |
| 55 | +- VSSDK: Latest 17.* release |
| 56 | + |
| 57 | +**Target Frameworks:** |
| 58 | +- Main VSIX project: .NET Framework 4.8 |
| 59 | +- Library projects: .NET Standard 2.0 (may use SDK-style project format) |
| 60 | + |
| 61 | +**VSIX Manifest:** |
| 62 | +- Version range: `[17.0,19.0)` — supports VS 2022 through VS 2026 |
| 63 | +- Architectures: AMD64 and ARM64 |
| 64 | +- Prerequisites: List Community edition only (captures Pro/Enterprise) |
| 65 | + |
| 66 | +**CI/CD:** |
| 67 | +- Build workflow: Automated build on push/PR |
| 68 | +- Publish workflow: Automated marketplace publishing |
| 69 | +- Marketplace config: `publish.manifest.json` for automated publishing |
| 70 | + |
| 71 | +**Development Environment:** |
| 72 | +- Required extension: Extensibility Essentials 2022 |
| 73 | +- Helper library: Community.VisualStudio.Toolkit (where applicable) |
| 74 | + |
| 75 | +**Documentation:** |
| 76 | +- README should be exciting and use emojis |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Project Overview |
| 81 | + |
| 82 | +VS-SuperClean is a Visual Studio 2022 extension that adds a "Super Clean" context menu option to Solution and Project nodes in Solution Explorer. It clears out bin and obj folders for all projects (when invoked on solution) or selected projects. |
| 83 | + |
| 84 | +## Build Commands |
| 85 | + |
| 86 | +```bash |
| 87 | +# Build the solution |
| 88 | +dotnet build src/CodingWithCalvin.SuperClean/CodingWithCalvin.SuperClean.csproj |
| 89 | + |
| 90 | +# Build Release |
| 91 | +dotnet build src/CodingWithCalvin.SuperClean/CodingWithCalvin.SuperClean.csproj -c Release |
| 92 | +``` |
| 93 | + |
| 94 | +## Architecture |
| 95 | + |
| 96 | +The extension has a simple architecture: |
| 97 | + |
| 98 | +- **SuperCleanPackage.cs** - Main VS Package class extending `AsyncPackage`. Initializes on load and sets up the command handler. |
| 99 | + |
| 100 | +- **Commands/SuperCleanCommand.cs** - Command handler that detects whether invoked on Solution or Project, then recursively deletes bin/obj folders for the appropriate scope. |
| 101 | + |
| 102 | +- **VSCommandTable.vsct** - Defines the context menu command placement for both Solution (`IDG_VS_CTXT_SOLUTION_EXPLORE`) and Project (`IDG_VS_CTXT_PROJECT_EXPLORE`) context menus. |
| 103 | + |
| 104 | +## Technology Stack |
| 105 | + |
| 106 | +- C# / .NET Framework 4.8 |
| 107 | +- CodingWithCalvin.VsixSdk/0.3.0 |
| 108 | +- Community.VisualStudio.Toolkit.17 |
| 109 | +- Visual Studio SDK (v17.0+) |
| 110 | +- VSIX v3 package format |
| 111 | + |
| 112 | +## CI/CD |
| 113 | + |
| 114 | +GitHub Actions workflows in `.github/workflows/`: |
| 115 | + |
| 116 | +- **build.yml** - Triggered on push to main or PR. Builds and uploads VSIX artifact. |
| 117 | +- **publish.yml** - Manual trigger to publish to VS Marketplace. |
| 118 | + |
| 119 | +## Development Setup |
| 120 | + |
| 121 | +- Requires Visual Studio 2022 with "Visual Studio extension development" workload |
| 122 | +- Install "Extensibility Essentials 2022" extension |
| 123 | +- Open `src/CodingWithCalvin.SuperClean.slnx` in Visual Studio |
| 124 | +- Test by running in experimental VS instance (F5 from VS) |
0 commit comments