.cursorrules 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Terminal.Gui - Cursor AI Rules
  2. This project uses comprehensive AI agent instructions. See:
  3. - `.github/copilot-instructions.md` - Complete onboarding guide (primary reference)
  4. - `AGENTS.md` - General AI agent guidelines
  5. ## Quick Reference
  6. ### Project Type
  7. - .NET 8.0 cross-platform console UI toolkit
  8. - 496 source files in core library
  9. - GitFlow branching (v2_develop = default)
  10. ### Essential Commands
  11. ```bash
  12. # Always run from repo root in this order:
  13. dotnet restore # First! (~15-20s)
  14. dotnet build --configuration Debug --no-restore # ~50s, expect ~326 warnings
  15. dotnet test Tests/UnitTestsParallelizable --no-build # Preferred test suite
  16. dotnet run --project Examples/UICatalog/UICatalog.csproj # Demo app
  17. ```
  18. ### Code Style (Enforced)
  19. - **DO**: Use explicit types (avoid `var`), target-typed `new()`, 4-space indent
  20. - **DO**: Format only files you modify (ReSharper/Rider `Ctrl-E-C` or `Ctrl-K-D`)
  21. - **DO**: Follow `.editorconfig` and `Terminal.sln.DotSettings`
  22. - **DON'T**: Add new linters, modify unrelated code, decrease test coverage
  23. ### Testing Rules
  24. - Add new tests to `Tests/UnitTestsParallelizable/` (preferred)
  25. - Avoid `Application.Init` and static dependencies in tests
  26. - Don't use `[AutoInitShutdown]` attribute (legacy)
  27. - Maintain 70%+ code coverage on new code
  28. ### API Documentation (Required)
  29. - All public APIs need XML docs (`<summary>`, `<remarks>`, `<example>`)
  30. - Use `<see cref=""/>` for cross-references
  31. - Complex topics → `docfx/docs/*.md`
  32. ### Common Issues
  33. - ~326 build warnings are normal (nullable refs, etc.)
  34. - Tests can take 5-10 minutes
  35. - Run `dotnet restore` before any build
  36. - Read `.github/copilot-instructions.md` for full troubleshooting
  37. ---
  38. **See `.github/copilot-instructions.md` for complete instructions**